diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..dfb7a75d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "mimalloc-bench"] + path = mimalloc-bench + url = https://github.com/daanx/mimalloc-bench.git diff --git a/Makefile b/Makefile index e63110c6..bd1c4442 100644 --- a/Makefile +++ b/Makefile @@ -328,14 +328,11 @@ larson_mi.o: $(LARSON_SRC) larson_mi: larson_mi.o $(CXX) -o $@ $^ -L mimalloc-bench/extern/mi/out/release -lmimalloc $(LDFLAGS) -# HAKMEM variant (override malloc/free to our front via shim, link core) -bench_larson_hakmem_shim.o: bench_larson_hakmem_shim.c bench/larson_hakmem_shim.h - $(CC) $(CFLAGS) -I core -c -o $@ $< +# HAKMEM variant (hakmem.o provides malloc/free symbols directly) +larson_hakmem.o: $(LARSON_SRC) + $(CXX) $(CFLAGS) -I core -c -o $@ $< -larson_hakmem.o: $(LARSON_SRC) bench/larson_hakmem_shim.h - $(CXX) $(CFLAGS) -I core -include bench/larson_hakmem_shim.h -c -o $@ $< - -larson_hakmem: larson_hakmem.o bench_larson_hakmem_shim.o $(TINY_BENCH_OBJS) +larson_hakmem: larson_hakmem.o $(TINY_BENCH_OBJS) $(CXX) -o $@ $^ $(LDFLAGS) test_mf2: test_mf2.o $(TINY_BENCH_OBJS) diff --git a/mimalloc-bench b/mimalloc-bench new file mode 160000 index 00000000..6ec12891 --- /dev/null +++ b/mimalloc-bench @@ -0,0 +1 @@ +Subproject commit 6ec12891f89ec5cb6fcaef4b5162a07a0b222fca