mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
Restructuring of build to allow use of use-space allocators by kernel logic in the kernel build.
This commit is contained in:
@@ -67,8 +67,9 @@
|
|||||||
*
|
*
|
||||||
* The ARMv7 has no MPU but does have an MMU. With this MMU, it can support
|
* The ARMv7 has no MPU but does have an MMU. With this MMU, it can support
|
||||||
* the kernel build (CONFIG_BUILD_KERNEL=y). In this configuration, there
|
* the kernel build (CONFIG_BUILD_KERNEL=y). In this configuration, there
|
||||||
* is again only one heap but, retaining the terminology, this is the kernel
|
* is one kernel heap but multiple user heaps: One per task group. However,
|
||||||
* heap.
|
* in this case, we need only be concerned about initializing the single
|
||||||
|
* kernel heap here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -69,13 +69,12 @@
|
|||||||
*
|
*
|
||||||
* The ARMv7 has no MPU but does have an MMU. With this MMU, it can support
|
* The ARMv7 has no MPU but does have an MMU. With this MMU, it can support
|
||||||
* the kernel build (CONFIG_BUILD_KERNEL=y). In this configuration, there
|
* the kernel build (CONFIG_BUILD_KERNEL=y). In this configuration, there
|
||||||
* is again only one heap but, retaining the terminology, this is the kernel
|
* is one kernel heap but multiple user heaps: One per task group. However,
|
||||||
* heap.
|
* in this case, we need only be concerned about initializing the single
|
||||||
|
* kernel heap here.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(CONFIG_MM_USER_HEAP) && defined(CONFIG_MM_KERNEL_HEAP)
|
#if defined(CONFIG_BUILD_KERNEL)
|
||||||
# error "Cannot support both user and kernel heaps"
|
|
||||||
#elif defined(CONFIG_MM_KERNEL_HEAP)
|
|
||||||
# define MM_ADDREGION kmm_addregion
|
# define MM_ADDREGION kmm_addregion
|
||||||
#else
|
#else
|
||||||
# define MM_ADDREGION umm_addregion
|
# define MM_ADDREGION umm_addregion
|
||||||
@@ -247,10 +246,10 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_MM_USER_HEAP)
|
#if defined(CONFIG_BUILD_KERNEL)
|
||||||
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|
||||||
#elif defined(CONFIG_MM_KERNEL_HEAP)
|
|
||||||
void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
|
void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
|
||||||
|
#else
|
||||||
|
void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_BOOT_SDRAM_DATA)
|
#if defined(CONFIG_BOOT_SDRAM_DATA)
|
||||||
|
|||||||
Reference in New Issue
Block a user