Skip to content

Commit a772704

Browse files
committed
Stop using nedmalloc on Windows
Nedmalloc has been EOL for a while according to its author (ned14/nedmalloc#20 (comment)): "nedmalloc is pretty much EOL. Happy to accept patches, but unwilling to fix. You should use the system allocator on any recent OS instead." It was also leading to compilation errors to ARM64 using llvm-mingw on Windows: In file included from F:\git-sdk-64\usr\src\git\compat\nedmalloc\nedmalloc.c:63: F:\git-sdk-64\usr\src\git\compat\nedmalloc/malloc.c.h:1404:57: error: static declaration of '_InterlockedExchange' follows non-static declaration static __inline__ __attribute__((always_inline)) long _InterlockedExchange(volatile long * const Target, const long Value) Git will now use the built-in OS memory allocation on Windows instead. Signed-off-by: Dennis Ameling <[email protected]>
1 parent 3f28c5f commit a772704

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
284284
add_compile_definitions(HAVE_ALLOCA_H NO_POSIX_GOODIES NATIVE_CRLF NO_UNIX_SOCKETS WIN32
285285
_CONSOLE DETECT_MSYS_TTY STRIP_EXTENSION=".exe" NO_SYMLINK_HEAD UNRELIABLE_FSTAT
286286
NOGDI OBJECT_CREATION_MODE=1 __USE_MINGW_ANSI_STDIO=0
287-
USE_NED_ALLOCATOR OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP
287+
OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP
288288
UNICODE _UNICODE HAVE_WPGMPTR ENSURE_MSYSTEM_IS_SET)
289289
list(APPEND compat_SOURCES compat/mingw.c compat/winansi.c compat/win32/path-utils.c
290290
compat/win32/pthread.c compat/win32mmap.c compat/win32/syslog.c
291291
compat/win32/trace2_win32_process_info.c compat/win32/dirent.c
292-
compat/nedmalloc/nedmalloc.c compat/strdup.c compat/win32/fscache.c)
292+
compat/strdup.c compat/win32/fscache.c)
293293
set(NO_UNIX_SOCKETS 1)
294294

295295
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")

0 commit comments

Comments
 (0)