From 98ffb2ff73ed532884dad86e9210f6cee4ab1e8a Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 20 Jul 2020 12:09:13 +0200 Subject: [make] don't use free to obtain total memory just read /proc/meminfo --- allocbench/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/allocbench/Makefile b/allocbench/Makefile index caceb19..4d67fbf 100644 --- a/allocbench/Makefile +++ b/allocbench/Makefile @@ -10,7 +10,7 @@ CFLAGS ?= $(OPTFLAGS) $(WARNFLAGS) $(COMMONFLAGS) LDFLAGS ?= -pthread -static-libgcc -MEMSIZE_KB=$(shell free -t | tail -1 | tr -s ' ' | cut -d ' ' -f 2) +MEMSIZE_KB=$(shell grep -E "MemTotal|SwapTotal" /proc/meminfo | grep -o "[0-9]*" | paste -sd+ | bc) MEMSIZE="$(MEMSIZE_KB) * 1024l" TOOLS = print_status_on_exit.so exec sig_handlers.so -- cgit v1.2.3