git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Dropping nedmalloc support? was Re: [PATCH 3/6] mingw: do not use nedmalloc on Windows/ARM64

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Apr 22, 2025, 08:17 UTC
Message-ID
<00fd3145-b3d2-ddab-466d-d06fd27298ec@gmx.de>
In-Reply-To
<aAdIlq8Np8LpahLS@pks.im>
Hi Patrick,
On Tue, 22 Apr 2025, Patrick Steinhardt wrote:
Show 10 quoted lines
> On Mon, Apr 21, 2025 at 12:39:07PM +0000, Johannes Schindelin via GitGitGadget wrote:
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> > 
> > It does not compile there, and seeing as nedmalloc has been pretty much
> > unmaintained since at least November 2017, as per
> > https://github.com/ned14/nedmalloc/issues/20#issuecomment-343432314,
> > there is also no hope that any fixes will materialize there.
> 
> This kind of raises the question whether we want to keep on maintaining
> nedmalloc in our codebase at all. Is there any strong reason to have it?

To the contrary, There is a very strong reason to drop it: nedmalloc is unmaintained.

There is just a teeny tiny blocker before it can be dropped, though:

$ git grep -n USE_NED_ALLOCATOR upstream/master -- ':(exclude)Makefile' upstream/master:config.mak.uname:478: # USE_NED_ALLOCATOR = YesPlease upstream/master:config.mak.uname:741: USE_NED_ALLOCATOR = YesPlease upstream/master:contrib/buildsystems/CMakeLists.txt:258: USE_NED_ALLOCATOR OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP

The commented-out one is the MSVC build (I had experimental Git for Windows patches to enable nedmalloc even in MSVC builds, which I abandoned in favor of https://github.com/git-for-windows/git/pull/4580 to enable mimalloc in MSVC builds, but I abandoned that effort, too, because Git decided to favor Meson over first-class MSVC support and I decided to focus on avoiding to have my time wasted by the Git project).

As you are quite aware (because it caused plenty of trouble with your reftable patch series), Git for Windows switched to mimalloc quite a while ago (https://github.com/microsoft/mimalloc).

When I switched Git for Windows to mimalloc, I did (re-)run a couple of performance tests to see whether having a custom allocator is still necessary, and from my (unfortunately too vague) recollection, Windows 11's default allocator seems to have performed quite well in comparison. Which is in stark contrast to the results of the performance tests I ran when originally integrating nedmalloc. So: In theory, Git for Windows could drop building with a custom allocator, iff it wasn't for older Windows version that are still supported.

Which means that I would like to upstream the vendored-in mimalloc first, with the patch to use it when building on Windows by default, before dropping nedmalloc from Git's source code.

Ciao, Johannes

Previous: Patrick SteinhardtNext: Johannes Schindelin via GitGitGadget
Message 6 of 20 in “Support Windows/ARM64”
  1. 0/6 Support Windows/ARM64Johannes Schindelin via GitGitGadget, Apr 21, 2025
  2. 1/6 bswap.h: add support for built-in bswap functionsDennis Ameling via GitGitGadget, Apr 21, 2025
  3. 2/6 config.mak.uname: add support for clangarm64Dennis Ameling via GitGitGadget, Apr 21, 2025
  4. 3/6 mingw: do not use nedmalloc on Windows/ARM64Johannes Schindelin via GitGitGadget, Apr 21, 2025
  5. Patrick SteinhardtApr 22, 2025
  6. Dropping nedmalloc support? was Re: [PATCH 3/6] mingw: do not use nedmalloc on Windows/ARM64Johannes Schindelin, Apr 22, 2025
  7. 4/6 msvc: do handle builds on Windows/ARM64Johannes Schindelin via GitGitGadget, Apr 21, 2025
  8. 6/6 max_tree_depth: lower it for clangarm64 on WindowsJohannes Schindelin via GitGitGadget, Apr 21, 2025
  9. Patrick SteinhardtApr 22, 2025
  10. Johannes SchindelinApr 22, 2025
  11. 5/6 mingw(arm64): do move the `/etc/git*` locationJohannes Schindelin via GitGitGadget, Apr 21, 2025
  12. Junio C HamanoApr 21, 2025
  13. 0/6 Support Windows/ARM64Johannes Schindelin via GitGitGadget, Apr 23, 2025
  14. 1/6 bswap.h: add support for built-in bswap functionsDennis Ameling via GitGitGadget, Apr 23, 2025
  15. 2/6 config.mak.uname: add support for clangarm64Dennis Ameling via GitGitGadget, Apr 23, 2025
  16. 3/6 mingw: do not use nedmalloc on Windows/ARM64Johannes Schindelin via GitGitGadget, Apr 23, 2025
  17. Junio C HamanoApr 23, 2025
  18. 4/6 msvc: do handle builds on Windows/ARM64Johannes Schindelin via GitGitGadget, Apr 23, 2025
  19. 5/6 mingw(arm64): do move the `/etc/git*` locationJohannes Schindelin via GitGitGadget, Apr 23, 2025
  20. 6/6 max_tree_depth: lower it for clangarm64 on WindowsJohannes Schindelin via GitGitGadget, Apr 23, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.