diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-05-28 21:42:18 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-05-28 21:42:18 +0000 |
commit | 94c7babe23d72a1e379da0cf0aab32fcf9fadcf3 (patch) | |
tree | eedc930a4ed4a1108c87cae26d3fcda7e411dd1f /nuttx/arch/sim | |
parent | 405c2b328ff4cd571bb9e464541b4d297b18f93d (diff) | |
download | px4-nuttx-94c7babe23d72a1e379da0cf0aab32fcf9fadcf3.tar.gz px4-nuttx-94c7babe23d72a1e379da0cf0aab32fcf9fadcf3.tar.bz2 px4-nuttx-94c7babe23d72a1e379da0cf0aab32fcf9fadcf3.zip |
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
Diffstat (limited to 'nuttx/arch/sim')
-rw-r--r-- | nuttx/arch/sim/src/up_allocateheap.c | 2 | ||||
-rw-r--r-- | nuttx/arch/sim/src/up_internal.h | 9 |
2 files changed, 9 insertions, 2 deletions
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 <nuttx/config.h> #include <sys/types.h> #include <nuttx/irq.h> @@ -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 */ |