Skip to content

Commit c441d13

Browse files
committed
cmake: use mimalloc instead of nedmalloc
Just like in the regular GCC (MINGW) build, let's do the same in the CMake (Visual C) build. This is a long-overdue companion patch to git-for-windows#4013 Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 9cdc478 commit c441d13

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

contrib/buildsystems/CMakeLists.txt

+17-2
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
292292
add_compile_definitions(_CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE)
293293
endif()
294294
include_directories(${CMAKE_SOURCE_DIR}/compat/win32)
295+
include_directories(${CMAKE_SOURCE_DIR}/compat/mimalloc)
295296
add_compile_definitions(HAVE_ALLOCA_H NO_POSIX_GOODIES NATIVE_CRLF NO_UNIX_SOCKETS WIN32
296297
_CONSOLE DETECT_MSYS_TTY STRIP_EXTENSION=".exe" NO_SYMLINK_HEAD UNRELIABLE_FSTAT
297298
NOGDI OBJECT_CREATION_MODE=1 __USE_MINGW_ANSI_STDIO=0
298-
USE_NED_ALLOCATOR OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP
299+
USE_MIMALLOC OVERRIDE_STRDUP MMAP_PREVENTS_DELETE USE_WIN32_MMAP
299300
HAVE_WPGMPTR ENSURE_MSYSTEM_IS_SET HAVE_RTLGENRANDOM)
300301
list(APPEND compat_SOURCES
301302
compat/mingw.c
@@ -308,7 +309,21 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
308309
compat/win32/trace2_win32_process_info.c
309310
compat/win32/dirent.c
310311
compat/win32/wsl.c
311-
compat/nedmalloc/nedmalloc.c
312+
compat/mimalloc/alloc-aligned.c
313+
compat/mimalloc/alloc.c
314+
compat/mimalloc/arena.c
315+
compat/mimalloc/bitmap.c
316+
compat/mimalloc/heap.c
317+
compat/mimalloc/init.c
318+
compat/mimalloc/options.c
319+
compat/mimalloc/os.c
320+
compat/mimalloc/page.c
321+
compat/mimalloc/prim/windows/prim.c
322+
compat/mimalloc/random.c
323+
compat/mimalloc/segment.c
324+
compat/mimalloc/segment-cache.c
325+
compat/mimalloc/segment-map.c
326+
compat/mimalloc/stats.c
312327
compat/strdup.c
313328
compat/win32/fscache.c)
314329
set(NO_UNIX_SOCKETS 1)

0 commit comments

Comments
 (0)