summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/sama5/sam_allocateheap.c
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-02 11:22:09 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-02 11:22:09 -0600
commit70364682c1d59b7ac26548085cc8faa835086c02 (patch)
tree9d6b1584b65ed5dbc7896ad55d677c3540fdc115 /nuttx/arch/arm/src/sama5/sam_allocateheap.c
parent0c224f7e3dd878868fe921a5b41efe2362ce7fb6 (diff)
downloadnuttx-70364682c1d59b7ac26548085cc8faa835086c02.tar.gz
nuttx-70364682c1d59b7ac26548085cc8faa835086c02.tar.bz2
nuttx-70364682c1d59b7ac26548085cc8faa835086c02.zip
Restructuring of build to allow use of use-space allocators by kernel logic in the kernel build.
Diffstat (limited to 'nuttx/arch/arm/src/sama5/sam_allocateheap.c')
-rw-r--r--nuttx/arch/arm/src/sama5/sam_allocateheap.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/nuttx/arch/arm/src/sama5/sam_allocateheap.c b/nuttx/arch/arm/src/sama5/sam_allocateheap.c
index 616b6f0fd..5cff278aa 100644
--- a/nuttx/arch/arm/src/sama5/sam_allocateheap.c
+++ b/nuttx/arch/arm/src/sama5/sam_allocateheap.c
@@ -69,13 +69,12 @@
*
* 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
- * is again only one heap but, retaining the terminology, this is the kernel
- * heap.
+ * is one kernel heap but multiple user heaps: One per task group. However,
+ * 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)
-# error "Cannot support both user and kernel heaps"
-#elif defined(CONFIG_MM_KERNEL_HEAP)
+#if defined(CONFIG_BUILD_KERNEL)
# define MM_ADDREGION kmm_addregion
#else
# define MM_ADDREGION umm_addregion
@@ -247,10 +246,10 @@
*
****************************************************************************/
-#if defined(CONFIG_MM_USER_HEAP)
-void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
-#elif defined(CONFIG_MM_KERNEL_HEAP)
+#if defined(CONFIG_BUILD_KERNEL)
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
{
#if defined(CONFIG_BOOT_SDRAM_DATA)