diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-09-06 20:48:39 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-09-06 20:48:39 +0000 |
commit | 2939906ef52709a869fc46b289d0c0bffe9e8aba (patch) | |
tree | 4bf1bde6e98458f5e9a926a4282db8a39fafd256 /nuttx/arch/arm/src/lpc313x | |
parent | 74c1e661abf325a99cc8185492214a7bde852fd5 (diff) | |
download | px4-nuttx-2939906ef52709a869fc46b289d0c0bffe9e8aba.tar.gz px4-nuttx-2939906ef52709a869fc46b289d0c0bffe9e8aba.tar.bz2 px4-nuttx-2939906ef52709a869fc46b289d0c0bffe9e8aba.zip |
Fix heap layout issue
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2925 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/src/lpc313x')
-rwxr-xr-x | nuttx/arch/arm/src/lpc313x/lpc313x_allocateheap.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/lpc313x/lpc313x_allocateheap.c b/nuttx/arch/arm/src/lpc313x/lpc313x_allocateheap.c index e6b587fd3..79ba8464e 100755 --- a/nuttx/arch/arm/src/lpc313x/lpc313x_allocateheap.c +++ b/nuttx/arch/arm/src/lpc313x/lpc313x_allocateheap.c @@ -51,6 +51,11 @@ #include "up_internal.h" #include "lpc313x_memorymap.h" +#ifdef CONFIG_PAGING +# include <nuttx/page.h> +# include "pg_macros.h" +#endif + /************************************************************************ * Pre-processor Definitions ************************************************************************/ @@ -121,10 +126,18 @@ * will let the heap run all the way to the end of SRAM. */ -#ifdef PGTABLE_IN_HIGHSRAM -# define LPC313X_HEAP_VEND (LPC313X_INTSRAM_VSECTION + LPC313X_ISRAM_SIZE - PGTABLE_SIZE) +#ifdef CONFIG_PAGING +# ifdef PGTABLE_IN_HIGHSRAM +# define LPC313X_HEAP_VEND (PG_LOCKED_VBASE + PG_TOTAL_VSIZE - PGTABLE_SIZE) +# else +# define LPC313X_HEAP_VEND (PG_LOCKED_VBASE + PG_TOTAL_VSIZE) +# endif #else -# define LPC313X_HEAP_VEND (LPC313X_INTSRAM_VSECTION + LPC313X_ISRAM_SIZE) +# ifdef PGTABLE_IN_HIGHSRAM +# define LPC313X_HEAP_VEND (LPC313X_INTSRAM_VSECTION + LPC313X_ISRAM_SIZE - PGTABLE_SIZE) +# else +# define LPC313X_HEAP_VEND (LPC313X_INTSRAM_VSECTION + LPC313X_ISRAM_SIZE) +# endif #endif /************************************************************************ |