@@ -112,6 +112,8 @@ MIMALLOC_WRAPPER := allocators/mimalloc/mimalloc_wrapper.c
112112JEMALLOC_WRAPPER := allocators/jemalloc/jemalloc_wrapper.c
113113GLIBC_ALLOC := allocators/glibc/glibc_allocator.c
114114SKELETON_ALLOC := allocators/skeleton/my_allocator.c
115+ SHARE_RDALLOC_WRAPPER := allocators/share_rdalloc/share_rdalloc_wrapper.c
116+ SHARE_RDALLOC_DIR ?= ../share-rdAlloc
115117
116118# Force rebuild of allocator object when switching
117119clean-alloc :
@@ -136,6 +138,12 @@ test-glibc: clean-alloc
136138test-skeleton : clean-alloc
137139 $(MAKE ) run-tests ALLOCATOR=$(SKELETON_ALLOC )
138140
141+ test-share-rdalloc : clean-alloc
142+ $(MAKE ) -C $(SHARE_RDALLOC_DIR ) all
143+ $(MAKE ) run-tests ALLOCATOR=$(SHARE_RDALLOC_WRAPPER ) \
144+ EXTRA_CFLAGS=" -I$( SHARE_RDALLOC_DIR) " \
145+ EXTRA_LDFLAGS=" -L$( SHARE_RDALLOC_DIR) -lshare_rdalloc"
146+
139147# Benchmark/Performance targets
140148bench-glibc : clean-alloc
141149 $(MAKE ) MODE=bench run-bench ALLOCATOR=$(GLIBC_ALLOC )
@@ -176,9 +184,11 @@ help:
176184 @echo " test-jemalloc Run tests with Jemalloc (Release)"
177185 @echo " test-jemalloc-debug Run tests with Jemalloc (Debug)"
178186 @echo " test-skeleton Run tests with Student Skeleton"
187+ @echo " test-share-rdalloc Run tests with share-rdAlloc (set SHARE_RDALLOC_DIR if not ../share-rdAlloc)"
179188 @echo " "
180189 @echo " Variables:"
181- @echo " ALLOCATOR=path Path to custom allocator source"
190+ @echo " ALLOCATOR=path Path to custom allocator source"
191+ @echo " SHARE_RDALLOC_DIR Path to share-rdAlloc (default: ../share-rdAlloc)"
182192 @echo " MODE=debug Build with -O0 -g3 -fsanitize"
183193 @echo " MODE=release Build with -O2 -DNDEBUG"
184194 @echo " MODE=bench Build with -O3 -march=native"
0 commit comments