From 1eb0c03c2198a7ec9de456b83dacdc4831b96cbf Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 13 Sep 2015 14:45:15 +0200 Subject: malloc_simple: Add Kconfig option for using only malloc_simple in the SPL common/dlmalloc.c is quite big, both in .text and .data usage, therefor on some boards the SPL is build to use only malloc_simple.c and not the dlmalloc.c code. This is done in various include/configs/foo.h with the following construct: #ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_MALLOC_SIMPLE #endif This commit introduces a SPL_MALLOC_SIMPLE Kconfig bool which allows selecting this functionality through Kconfig instead. Signed-off-by: Hans de Goede Acked-by: Simon Glass --- common/malloc_simple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/malloc_simple.c') diff --git a/common/malloc_simple.c b/common/malloc_simple.c index c74586376d..9bf1fedd51 100644 --- a/common/malloc_simple.c +++ b/common/malloc_simple.c @@ -40,7 +40,7 @@ void *memalign_simple(size_t align, size_t bytes) return ptr; } -#ifdef CONFIG_SYS_MALLOC_SIMPLE +#if CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) void *calloc(size_t nmemb, size_t elem_size) { size_t size = nmemb * elem_size; -- cgit v1.2.1