diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile | 9 | ||||
-rw-r--r-- | tests/fullbench.c | 8 |
2 files changed, 14 insertions, 3 deletions
diff --git a/tests/Makefile b/tests/Makefile index 43c9651..476849e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -53,6 +53,7 @@ TEST_FILES := COPYING FUZZER_TIME := -T90s NB_LOOPS ?= -i1 +.PHONY: default default: all all: fullbench fuzzer frametest roundTripTest datagen checkFrame decompress-partial @@ -89,6 +90,10 @@ fullbench-dll: fullbench.c $(LZ4DIR)/xxhash.c $(MAKE) -C $(LZ4DIR) liblz4 $(CC) $(FLAGS) $^ -o $@$(EXT) -DLZ4_DLL_IMPORT=1 $(LZ4DIR)/dll/$(LIBLZ4).dll +# test LZ4_USER_MEMORY_FUNCTIONS +fullbench-wmalloc: CPPFLAGS += -DLZ4_USER_MEMORY_FUNCTIONS +fullbench-wmalloc: fullbench + fuzzer : lz4.o lz4hc.o xxhash.o fuzzer.c $(CC) $(FLAGS) $^ -o $@$(EXT) @@ -107,6 +112,7 @@ checkFrame : lz4frame.o lz4.o lz4hc.o xxhash.o checkFrame.c decompress-partial: lz4.o decompress-partial.c $(CC) $(FLAGS) $^ -o $@$(EXT) +.PHONY: clean clean: @$(MAKE) -C $(LZ4DIR) $@ > $(VOID) @$(MAKE) -C $(PRGDIR) $@ > $(VOID) @@ -170,9 +176,6 @@ test32: test test-amalgamation: lz4_all.o -lz4_all.o: lz4_all.c - $(CC) $(CFLAGS) $(CPPFLAGS) -c $^ -o $@ - lz4_all.c: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/lz4frame.c $(CAT) $^ > $@ diff --git a/tests/fullbench.c b/tests/fullbench.c index 77f475b..0e3c009 100644 --- a/tests/fullbench.c +++ b/tests/fullbench.c @@ -156,6 +156,14 @@ static size_t BMK_findMaxMem(U64 requiredMem) /********************************************************* +* Memory management, to test LZ4_USER_MEMORY_FUNCTIONS +*********************************************************/ +void* LZ4_malloc(size_t s) { return malloc(s); } +void* LZ4_calloc(size_t s) { return calloc(1,s); } +void LZ4_free(void* p) { return free(p); } + + +/********************************************************* * Benchmark function *********************************************************/ static LZ4_stream_t LZ4_stream; |