Skip to content

Commit 7865131

Browse files
committed
fixup! mimalloc: offer a build-time option to enable it
Revert this in preparation for upgrading mimalloc to v2.1.2 and then redoing this patch. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 71e3d43 commit 7865131

File tree

4 files changed

+1
-48
lines changed

4 files changed

+1
-48
lines changed

Makefile

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,41 +2076,6 @@ ifdef USE_NED_ALLOCATOR
20762076
OVERRIDE_STRDUP = YesPlease
20772077
endif
20782078

2079-
ifdef USE_MIMALLOC
2080-
MIMALLOC_OBJS = \
2081-
compat/mimalloc/alloc-aligned.o \
2082-
compat/mimalloc/alloc.o \
2083-
compat/mimalloc/arena.o \
2084-
compat/mimalloc/bitmap.o \
2085-
compat/mimalloc/heap.o \
2086-
compat/mimalloc/init.o \
2087-
compat/mimalloc/options.o \
2088-
compat/mimalloc/os.o \
2089-
compat/mimalloc/page.o \
2090-
compat/mimalloc/random.o \
2091-
compat/mimalloc/segment.o \
2092-
compat/mimalloc/segment-cache.o \
2093-
compat/mimalloc/stats.o
2094-
2095-
COMPAT_CFLAGS += -Icompat/mimalloc -DMI_DEBUG=0 -DUSE_MIMALLOC --std=gnu11
2096-
COMPAT_OBJS += $(MIMALLOC_OBJS)
2097-
2098-
$(MIMALLOC_OBJS): COMPAT_CFLAGS += -DBANNED_H
2099-
2100-
$(MIMALLOC_OBJS): COMPAT_CFLAGS += \
2101-
-Wno-attributes \
2102-
-Wno-unknown-pragmas \
2103-
-Wno-array-bounds
2104-
2105-
ifdef DEVELOPER
2106-
$(MIMALLOC_OBJS): COMPAT_CFLAGS += \
2107-
-Wno-pedantic \
2108-
-Wno-declaration-after-statement \
2109-
-Wno-old-style-definition \
2110-
-Wno-missing-prototypes
2111-
endif
2112-
endif
2113-
21142079
ifdef OVERRIDE_STRDUP
21152080
COMPAT_CFLAGS += -DOVERRIDE_STRDUP
21162081
COMPAT_OBJS += compat/strdup.o

config.mak.dev

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ endif
2222

2323
ifneq ($(uname_S),FreeBSD)
2424
ifneq ($(or $(filter gcc6,$(COMPILER_FEATURES)),$(filter clang7,$(COMPILER_FEATURES))),)
25-
ifndef USE_MIMALLOC
2625
DEVELOPER_CFLAGS += -std=gnu99
2726
endif
28-
endif
2927
else
3028
# FreeBSD cannot limit to C99 because its system headers unconditionally
3129
# rely on C11 features.

config.mak.uname

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ endif
482482
CC = compat/vcbuild/scripts/clink.pl
483483
AR = compat/vcbuild/scripts/lib.pl
484484
CFLAGS =
485-
BASIC_CFLAGS = -nologo -I. -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -MP -std:c11
485+
BASIC_CFLAGS = -nologo -I. -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE
486486
COMPAT_OBJS = compat/msvc.o compat/winansi.o \
487487
compat/win32/flush.o \
488488
compat/win32/path-utils.o \

git-compat-util.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -408,16 +408,6 @@ char *gitdirname(char *);
408408
# include <sys/sysinfo.h>
409409
#endif
410410

411-
#ifdef USE_MIMALLOC
412-
#include "mimalloc.h"
413-
#define malloc mi_malloc
414-
#define calloc mi_calloc
415-
#define realloc mi_realloc
416-
#define free mi_free
417-
#define strdup mi_strdup
418-
#define strndup mi_strndup
419-
#endif
420-
421411
/* On most systems <netdb.h> would have given us this, but
422412
* not on some systems (e.g. z/OS).
423413
*/

0 commit comments

Comments
 (0)