Git development
 help / color / mirror / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Patrick Steinhardt <ps@pks.im>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH v3 0/6] mingw: stop using nedmalloc
Date: Fri, 08 May 2026 12:50:55 +0000	[thread overview]
Message-ID: <pull.2104.v3.git.1778244661.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2104.v2.git.1778169613.gitgitgadget@gmail.com>

Git for Windows' SDK wants to update GCC to v16. Since it is used in the CI
builds also of the git/git repository, it is crucial that GCC can compile
even the latter all right, but currently it does not, see
https://github.com/git-for-windows/git-sdk-64/actions/runs/25244795074.

Git for Windows switched away from nedmalloc to mimalloc a long time ago,
but recent benchmarks across Windows, macOS, and Linux (see
https://github.com/git-for-windows/git/pull/6231) show no measurable benefit
from mimalloc over the platforms' default allocators, so rather than
upstreaming the mimalloc support, I will drop it from Git for Windows
entirely.

This series therefore disables nedmalloc for MINGW builds and removes the
vendored-in nedmalloc from Git's source code; my earlier sketch in
https://lore.kernel.org/git/00fd3145-b3d2-ddab-466d-d06fd27298ec@gmx.de/ had
the opposite ordering only because it assumed mimalloc would land first.
Since that's not going to happen, it's best to move forward with this, so
that the CI builds can switch to using GCC 16 (and the current Git for
Windows SDK) on Windows.

The patches that remove the vendored sources have a slightly unusual shape:
the Git mailing list rejects messages over 100kB and
compat/nedmalloc/malloc.c.h alone is ~196kB of source, so the deletion of
that file is split at section boundaries into three commits, each
comfortably under the cap. The intention (as documented by the last three
commit messages) is for them to be squashed by the Git maintainer before
merging.

Changes since v2:

 * Reworded the last 4 patches as recommended by Junio, in preparation for
   squashing them on his end.

Changes since v1:

 * Also remove nedmalloc from the CMake and Meson configurations in the
   first patch.
 * Add follow-up patches that drop the nedmalloc build-system plumbing and
   source files.

Johannes Schindelin (6):
  mingw: stop using nedmalloc
  mingw: drop the build-system plumbing for nedmalloc
  mingw: remove the vendored compat/nedmalloc/ subtree
  to be squashed into 3/6 (chunk 1 of 3)
  to be squashed into 3/6 (chunk 2 of 3)
  to be squashed into 3/6 (chunk 3 of 3)

 Makefile                            |   17 -
 compat/nedmalloc/License.txt        |   23 -
 compat/nedmalloc/Readme.txt         |  136 -
 compat/nedmalloc/malloc.c.h         | 5761 ---------------------------
 compat/nedmalloc/nedmalloc.c        |  954 -----
 compat/nedmalloc/nedmalloc.h        |  180 -
 config.mak.uname                    |    4 -
 contrib/buildsystems/CMakeLists.txt |    3 +-
 contrib/vscode/init.sh              |    1 -
 meson.build                         |    2 -
 10 files changed, 1 insertion(+), 7080 deletions(-)
 delete mode 100644 compat/nedmalloc/License.txt
 delete mode 100644 compat/nedmalloc/Readme.txt
 delete mode 100644 compat/nedmalloc/malloc.c.h
 delete mode 100644 compat/nedmalloc/nedmalloc.c
 delete mode 100644 compat/nedmalloc/nedmalloc.h


base-commit: 94f057755b7941b321fd11fec1b2e3ca5313a4e0
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2104%2Fdscho%2Fstop-using-nedmalloc-with-mingw-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2104/dscho/stop-using-nedmalloc-with-mingw-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/2104

Range-diff vs v2:

 1:  d547877ae3 = 1:  d547877ae3 mingw: stop using nedmalloc
 2:  7b5daae659 = 2:  7b5daae659 mingw: drop the build-system plumbing for nedmalloc
 3:  a5ccd4dae3 ! 3:  fc7f5cae10 mingw: drop the small nedmalloc auxiliary files
     @@ Metadata
      Author: Johannes Schindelin <johannes.schindelin@gmx.de>
      
       ## Commit message ##
     -    mingw: drop the small nedmalloc auxiliary files
     +    mingw: remove the vendored compat/nedmalloc/ subtree
      
     -    The Git mailing list rejects messages over 100 KB, and
     -    compat/nedmalloc/malloc.c.h alone is ~196 KB of source, so the
     -    deletion of that file has to be split across several commits.
     -    Carving the four smaller files (the LICENSE, the README, and the
     -    nedmalloc.{c,h} wrappers) into a commit of their own gives the
     -    malloc.c.h-chunk commits that follow enough headroom to comfortably
     -    fit under the cap once email-envelope overhead is accounted for.
     +    The previous two commits stopped opting into nedmalloc on Windows
     +    and stripped out the build-system plumbing that referenced it; the
     +    compat/nedmalloc/ subtree now has no callers and no consumers in
     +    the build, so retire it from the tree.
     +
     +    Logically this is a single deletion of compat/nedmalloc/ in its
     +    entirety: License.txt, Readme.txt, nedmalloc.{c,h}, and the bulk of
     +    the subtree, malloc.c.h.  Unfortunately malloc.c.h alone is roughly
     +    196 KB while the Git mailing list rejects messages over 100 KB, so
     +    the deletion is artificially split across four commits cut at file
     +    or section-banner boundaries: this commit (the smaller auxiliary
     +    files) plus three chunks of malloc.c.h cut at its own top-level
     +    section banners ("Overlaid data structures" and "System
     +    allocation").  The split is purely a mailing-list accommodation,
     +    not a logical separation; the three follow-up patches in this
     +    series carry "to be squashed into 3/6" subjects so they can be
     +    folded back into this commit at integration time, per Junio's
     +    suggestion in
     +    <https://lore.kernel.org/git/xmqqfr42fw30.fsf@gitster.g/>.
      
          Assisted-by: Opus 4.7
          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
 4:  95682cc2c6 ! 4:  9085f00910 mingw: drop the first chunk of compat/nedmalloc/malloc.c.h
     @@ Metadata
      Author: Johannes Schindelin <johannes.schindelin@gmx.de>
      
       ## Commit message ##
     -    mingw: drop the first chunk of compat/nedmalloc/malloc.c.h
     -
     -    The vendored malloc.c.h is around 196 KB of source, which does not
     -    fit in a single mailing-list-sized message; the deletion is split
     -    across three commits cut at the file's own top-level section
     -    banners. This first chunk ends just before the "Overlaid data
     -    structures" banner.
     +    to be squashed into 3/6 (chunk 1 of 3)
      
          Assisted-by: Opus 4.7
          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
 5:  a605b58586 ! 5:  fa28d50d18 mingw: drop the second chunk of compat/nedmalloc/malloc.c.h
     @@ Metadata
      Author: Johannes Schindelin <johannes.schindelin@gmx.de>
      
       ## Commit message ##
     -    mingw: drop the second chunk of compat/nedmalloc/malloc.c.h
     -
     -    This is the second of three chunks splitting the malloc.c.h
     -    deletion (see the preceding commit for the rationale); it picks up
     -    at the "Overlaid data structures" banner and ends just before the
     -    "System allocation" banner.
     +    to be squashed into 3/6 (chunk 2 of 3)
      
          Assisted-by: Opus 4.7
          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
 6:  90d4137018 ! 6:  6e0fd5182f mingw: drop the rest of compat/nedmalloc/malloc.c.h
     @@ Metadata
      Author: Johannes Schindelin <johannes.schindelin@gmx.de>
      
       ## Commit message ##
     -    mingw: drop the rest of compat/nedmalloc/malloc.c.h
     -
     -    The third and final chunk removes the remainder of malloc.c.h, from
     -    the "System allocation" banner to the end of the file, and the file
     -    itself. With this commit the compat/nedmalloc/ directory is fully
     -    retired from the tree.
     +    to be squashed into 3/6 (chunk 3 of 3)
      
          Assisted-by: Opus 4.7
          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

-- 
gitgitgadget

  parent reply	other threads:[~2026-05-08 12:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-03 12:29 [PATCH] mingw: stop using nedmalloc Johannes Schindelin via GitGitGadget
2026-05-05  6:09 ` Patrick Steinhardt
2026-05-07 16:00 ` [PATCH v2 0/6] " Johannes Schindelin via GitGitGadget
2026-05-07 16:00   ` [PATCH v2 1/6] " Johannes Schindelin via GitGitGadget
2026-05-07 16:00   ` [PATCH v2 2/6] mingw: drop the build-system plumbing for nedmalloc Johannes Schindelin via GitGitGadget
2026-05-07 16:00   ` [PATCH v2 3/6] mingw: drop the small nedmalloc auxiliary files Johannes Schindelin via GitGitGadget
2026-05-07 16:00   ` [PATCH v2 4/6] mingw: drop the first chunk of compat/nedmalloc/malloc.c.h Johannes Schindelin via GitGitGadget
2026-05-07 16:00   ` [PATCH v2 5/6] mingw: drop the second " Johannes Schindelin via GitGitGadget
2026-05-07 16:00   ` [PATCH v2 6/6] mingw: drop the rest " Johannes Schindelin via GitGitGadget
2026-05-08  2:56   ` [PATCH v2 0/6] mingw: stop using nedmalloc Junio C Hamano
2026-05-08 14:15     ` Jeff King
2026-05-08 12:50   ` Johannes Schindelin via GitGitGadget [this message]
2026-05-08 12:50     ` [PATCH v3 1/6] " Johannes Schindelin via GitGitGadget
2026-05-08 12:50     ` [PATCH v3 2/6] mingw: drop the build-system plumbing for nedmalloc Johannes Schindelin via GitGitGadget
2026-05-08 12:50     ` [PATCH v3 3/6] mingw: remove the vendored compat/nedmalloc/ subtree Johannes Schindelin via GitGitGadget
2026-05-08 12:50     ` [PATCH v3 4/6] to be squashed into 3/6 (chunk 1 of 3) Johannes Schindelin via GitGitGadget
2026-05-08 12:51     ` [PATCH v3 5/6] to be squashed into 3/6 (chunk 2 " Johannes Schindelin via GitGitGadget
2026-05-08 12:51     ` [PATCH v3 6/6] to be squashed into 3/6 (chunk 3 " Johannes Schindelin via GitGitGadget
2026-05-08 13:17     ` [PATCH v3 0/6] mingw: stop using nedmalloc Patrick Steinhardt
2026-05-10  2:31     ` Junio C Hamano

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=pull.2104.v3.git.1778244661.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    --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