From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Patrick Steinhardt <ps@pks.im>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Dropping nedmalloc support? was Re: [PATCH 3/6] mingw: do not use nedmalloc on Windows/ARM64
Date: Tue, 22 Apr 2025 10:17:09 +0200 (CEST) [thread overview]
Message-ID: <00fd3145-b3d2-ddab-466d-d06fd27298ec@gmx.de> (raw)
In-Reply-To: <aAdIlq8Np8LpahLS@pks.im>
Hi Patrick,
On Tue, 22 Apr 2025, Patrick Steinhardt wrote:
> 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
next prev parent reply other threads:[~2025-04-22 8:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-21 12:39 [PATCH 0/6] Support Windows/ARM64 Johannes Schindelin via GitGitGadget
2025-04-21 12:39 ` [PATCH 1/6] bswap.h: add support for built-in bswap functions Dennis Ameling via GitGitGadget
2025-04-21 12:39 ` [PATCH 2/6] config.mak.uname: add support for clangarm64 Dennis Ameling via GitGitGadget
2025-04-21 12:39 ` [PATCH 3/6] mingw: do not use nedmalloc on Windows/ARM64 Johannes Schindelin via GitGitGadget
2025-04-22 7:43 ` Patrick Steinhardt
2025-04-22 8:17 ` Johannes Schindelin [this message]
2025-04-21 12:39 ` [PATCH 4/6] msvc: do handle builds " Johannes Schindelin via GitGitGadget
2025-04-21 12:39 ` [PATCH 5/6] mingw(arm64): do move the `/etc/git*` location Johannes Schindelin via GitGitGadget
2025-04-21 12:39 ` [PATCH 6/6] max_tree_depth: lower it for clangarm64 on Windows Johannes Schindelin via GitGitGadget
2025-04-22 7:43 ` Patrick Steinhardt
2025-04-22 7:49 ` Johannes Schindelin
2025-04-21 13:35 ` [PATCH 0/6] Support Windows/ARM64 Junio C Hamano
2025-04-23 8:01 ` [PATCH v2 " Johannes Schindelin via GitGitGadget
2025-04-23 8:01 ` [PATCH v2 1/6] bswap.h: add support for built-in bswap functions Dennis Ameling via GitGitGadget
2025-04-23 8:01 ` [PATCH v2 2/6] config.mak.uname: add support for clangarm64 Dennis Ameling via GitGitGadget
2025-04-23 8:01 ` [PATCH v2 3/6] mingw: do not use nedmalloc on Windows/ARM64 Johannes Schindelin via GitGitGadget
2025-04-23 16:20 ` Junio C Hamano
2025-04-23 8:01 ` [PATCH v2 4/6] msvc: do handle builds " Johannes Schindelin via GitGitGadget
2025-04-23 8:01 ` [PATCH v2 5/6] mingw(arm64): do move the `/etc/git*` location Johannes Schindelin via GitGitGadget
2025-04-23 8:01 ` [PATCH v2 6/6] max_tree_depth: lower it for clangarm64 on Windows Johannes Schindelin via GitGitGadget
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00fd3145-b3d2-ddab-466d-d06fd27298ec@gmx.de \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).