update override on macOS with interpose of malloc_default_zone (issues #313)

This commit is contained in:
Daan Leijen 2020-12-15 16:03:54 -08:00
parent 745cf1e2f5
commit bb386025b5
5 changed files with 75 additions and 46 deletions

View file

@ -20,7 +20,6 @@ terms of the MIT license.
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <mimalloc.h>
// > mimalloc-test-stress [THREADS] [SCALE] [ITER]
//
@ -43,6 +42,7 @@ static size_t use_one_size = 0; // use single object size of `N * s
#define custom_realloc(p,s) realloc(p,s)
#define custom_free(p) free(p)
#else
#include <mimalloc.h>
#define custom_calloc(n,s) mi_calloc(n,s)
#define custom_realloc(p,s) mi_realloc(p,s)
#define custom_free(p) mi_free(p)
@ -251,7 +251,9 @@ int main(int argc, char** argv) {
#endif
// mi_collect(true);
#ifndef USE_STD_MALLOC
mi_stats_print(NULL);
#endif
//bench_end_program();
return 0;
}