diff --git a/arch/arm/src/common/arm_allocateheap.c b/arch/arm/src/common/arm_allocateheap.c index 4d571fc3a0..ef28edc828 100644 --- a/arch/arm/src/common/arm_allocateheap.c +++ b/arch/arm/src/common/arm_allocateheap.c @@ -131,8 +131,14 @@ void weak_function up_allocate_heap(void **heap_start, size_t *heap_size) board_autoled_on(LED_HEAPALLOCATE); *heap_start = (void *)g_idle_topstack; + +#ifdef CONFIG_ARCH_PGPOOL_PBASE + *heap_size = CONFIG_ARCH_PGPOOL_PBASE - g_idle_topstack; +#else *heap_size = CONFIG_RAM_END - g_idle_topstack; #endif + +#endif } /****************************************************************************