kernel/init/os_start : Change heap initialization for multi-region
Initialize the heap with same way regardless of heap regions.
@@ -393,14 +393,8 @@ void os_start(void)
* the user-mode memory allocator.
*/
up_allocate_heap(&heap_start, &heap_size);
-
-#if CONFIG_MM_REGIONS > 1
- mm_initialize(&BASE_HEAP[regionx_heap_idx[0]], heap_start, heap_size);
- up_addregion();
-#else
kumm_initialize(heap_start, heap_size);
#endif
-#endif
#ifdef CONFIG_MM_KERNEL_HEAP
/* Get the kernel-mode heap from the platform specific code and configure
@@ -423,6 +417,8 @@ void os_start(void)
}
#endif
+ up_addregion();
+
#ifdef CONFIG_APP_BINARY_SEPARATION
/* If app binary separation is enabled, then each application will have its own RAM
* area called as the ram partition. The app's text, data, stack and heap will all be
