From 94c7babe23d72a1e379da0cf0aab32fcf9fadcf3 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 28 May 2011 21:42:18 +0000 Subject: atexit() functions now called when task killed by task delete; For MCUs with <= 64Kb of SRAM, CONFIG_MM_SMALL can be defined to reduce the memory allocation overhead git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3648 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/arch/sim/src/up_allocateheap.c | 2 +- nuttx/arch/sim/src/up_internal.h | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'nuttx/arch/sim') diff --git a/nuttx/arch/sim/src/up_allocateheap.c b/nuttx/arch/sim/src/up_allocateheap.c index 9278faf27..f02f8cbfa 100644 --- a/nuttx/arch/sim/src/up_allocateheap.c +++ b/nuttx/arch/sim/src/up_allocateheap.c @@ -81,5 +81,5 @@ static uint8_t sim_heap[SIM_HEAP_SIZE]; void up_allocate_heap(void **heap_start, size_t *heap_size) { *heap_start = sim_heap; - *heap_size = SIM_HEAP_SIZE; + *heap_size = SIM_HEAP_SIZE; } diff --git a/nuttx/arch/sim/src/up_internal.h b/nuttx/arch/sim/src/up_internal.h index 7f241e48e..094776390 100644 --- a/nuttx/arch/sim/src/up_internal.h +++ b/nuttx/arch/sim/src/up_internal.h @@ -40,6 +40,7 @@ * Included Files **************************************************************************/ +#include #include #include @@ -64,7 +65,13 @@ # define JB_PC (5) #endif /* __ASSEMBLY__ */ -#define SIM_HEAP_SIZE (4*1024*1024) +/* Size of the simulated heap */ + +#if CONFIG_MM_SMALL +# define SIM_HEAP_SIZE (64*1024) +#else +# define SIM_HEAP_SIZE (4*1024*1024) +#endif /* These definitions characterize the compressed filesystem image */ -- cgit v1.2.3