From b9cd13fedd8f077ecdd37857323eddddac285bc8 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 15 Aug 2019 19:27:59 +0200 Subject: implement alternative way to get memusage using wait4 run now forks the benchmark command instead of simply calling exec. Ressource usage of the benchmark is retrieved with a call to wait4. But the reported value ru_maxrss differs from values in /proc//status. --- src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index 8d6d110..00acfdc 100644 --- a/src/Makefile +++ b/src/Makefile @@ -15,7 +15,7 @@ MEMSIZE=$(shell echo $(MEMSIZE_KB)"* 1024" | bc) .PHONY: all clean -all: $(OBJDIR)/print_status_on_exit.so $(OBJDIR)/allocators/bumpptr_alloc.so $(OBJDIR)/exec +all: $(OBJDIR)/print_status_on_exit.so $(OBJDIR)/allocators/bumpptr_alloc.so $(OBJDIR)/run $(OBJDIR)/allocators/bumpptr_alloc.so: bumpptr_alloc.c Makefile | $(OBJDIR)/allocators @echo "Compiling $@..."; @@ -26,7 +26,7 @@ $(OBJDIR)/print_status_on_exit.so: print_status_on_exit.c Makefile | $(OBJDIR) @echo "Compiling $@..."; $(CC) $(LDFLAGS) -shared $(CFLAGS) -o $@ $< -$(OBJDIR)/exec: exec.c Makefile | $(OBJDIR) +$(OBJDIR)/run: run.c Makefile | $(OBJDIR) @echo "Compiling $@..."; $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $< -- cgit v1.2.3