From 3fbeeea63334f7a69406be7c05185f4bf45da8d8 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Fri, 17 Sep 2010 13:10:34 +0200 Subject: common: move TOTAL_MALLOC_LEN to include/common.h Portions of this work were supported by funding from the CE Linux Forum. Signed-off-by: Heiko Schocher --- include/common.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/common.h') diff --git a/include/common.h b/include/common.h index 7e647e64a..cc966722e 100644 --- a/include/common.h +++ b/include/common.h @@ -189,6 +189,15 @@ typedef void (interrupt_handler_t)(void *); #define MIN(x, y) min(x, y) #define MAX(x, y) max(x, y) +#if defined(CONFIG_ENV_IS_EMBEDDED) +#define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN +#elif ( ((CONFIG_ENV_ADDR+CONFIG_ENV_SIZE) < CONFIG_SYS_MONITOR_BASE) || \ + (CONFIG_ENV_ADDR >= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)) ) || \ + defined(CONFIG_ENV_IS_IN_NVRAM) +#define TOTAL_MALLOC_LEN (CONFIG_SYS_MALLOC_LEN + CONFIG_ENV_SIZE) +#else +#define TOTAL_MALLOC_LEN CONFIG_SYS_MALLOC_LEN +#endif /** * container_of - cast a member of a structure out to the containing structure -- cgit v1.2.3