Skip to content

Commit a54e2e5

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
fixup??? mimalloc: offer a build-time option to enable it
This is needed to ensure that the reftable tests have the correct idea which allocator to use. Suggested-by: Patrick Steinhardt <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 9d1c070 commit a54e2e5

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

compat/posix.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,16 @@ typedef unsigned long uintptr_t;
176176
#define _ALL_SOURCE 1
177177
#endif
178178

179+
#ifdef USE_MIMALLOC
180+
#include "mimalloc.h"
181+
#define malloc mi_malloc
182+
#define calloc mi_calloc
183+
#define realloc mi_realloc
184+
#define free mi_free
185+
#define strdup mi_strdup
186+
#define strndup mi_strndup
187+
#endif
188+
179189
#ifdef MKDIR_WO_TRAILING_SLASH
180190
#define mkdir(a,b) compat_mkdir_wo_trailing_slash((a),(b))
181191
int compat_mkdir_wo_trailing_slash(const char*, mode_t);

git-compat-util.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,6 @@ static inline const char *precompose_string_if_needed(const char *in)
233233
# include <sys/sysinfo.h>
234234
#endif
235235

236-
#ifdef USE_MIMALLOC
237-
#include "mimalloc.h"
238-
#define malloc mi_malloc
239-
#define calloc mi_calloc
240-
#define realloc mi_realloc
241-
#define free mi_free
242-
#define strdup mi_strdup
243-
#define strndup mi_strndup
244-
#endif
245-
246236
#ifndef PATH_SEP
247237
#define PATH_SEP ':'
248238
#endif

0 commit comments

Comments
 (0)