From f8ba8d687de8e7de0e0c1997dd4357b246ab9e47 Mon Sep 17 00:00:00 2001 From: Antony Pavlov Date: Wed, 21 Jan 2015 04:02:39 +0400 Subject: sandbox: get malloc_size from .config Signed-off-by: Antony Pavlov Signed-off-by: Sascha Hauer --- arch/sandbox/os/Makefile | 2 ++ arch/sandbox/os/common.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/sandbox/os') diff --git a/arch/sandbox/os/Makefile b/arch/sandbox/os/Makefile index 2e65be5eed..537f848e06 100644 --- a/arch/sandbox/os/Makefile +++ b/arch/sandbox/os/Makefile @@ -8,6 +8,8 @@ else CPPFLAGS = $(patsubst %,-I$(srctree)/%include,$(machdirs)) endif +CPPFLAGS += -DCONFIG_MALLOC_SIZE=$(CONFIG_MALLOC_SIZE) + CFLAGS := -Wall NOSTDINC_FLAGS := diff --git a/arch/sandbox/os/common.c b/arch/sandbox/os/common.c index 412393811e..0854fb5d80 100644 --- a/arch/sandbox/os/common.c +++ b/arch/sandbox/os/common.c @@ -285,7 +285,7 @@ int main(int argc, char *argv[]) { void *ram; int opt, ret, fd; - int malloc_size = 8 * 1024 * 1024; + int malloc_size = CONFIG_MALLOC_SIZE; char str[6]; int fdno = 0, envno = 0, option_index = 0; -- cgit v1.2.3