summaryrefslogtreecommitdiff
path: root/nuttx/mm
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-16 15:37:05 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-16 15:37:05 -0600
commite6416cf311f4fa773a371ea4aa51a46ea99baf7c (patch)
tree25e4d6db338e97593cdaccf5118ec687873f349b /nuttx/mm
parent877af73187ac7fc4a75f5f80542274b77b10ae83 (diff)
downloadnuttx-e6416cf311f4fa773a371ea4aa51a46ea99baf7c.tar.gz
nuttx-e6416cf311f4fa773a371ea4aa51a46ea99baf7c.tar.bz2
nuttx-e6416cf311f4fa773a371ea4aa51a46ea99baf7c.zip
First round of changes to get the ELF configuration building again
Diffstat (limited to 'nuttx/mm')
-rwxr-xr-xnuttx/mm/kmm_sbrk.c5
-rw-r--r--nuttx/mm/mm_sbrk.c5
-rw-r--r--nuttx/mm/umm_malloc.c4
-rw-r--r--nuttx/mm/umm_sbrk.c17
4 files changed, 10 insertions, 21 deletions
diff --git a/nuttx/mm/kmm_sbrk.c b/nuttx/mm/kmm_sbrk.c
index 547dba047..90c9b6627 100755
--- a/nuttx/mm/kmm_sbrk.c
+++ b/nuttx/mm/kmm_sbrk.c
@@ -41,8 +41,7 @@
#include <nuttx/mm.h>
-#if defined(CONFIG_MM_KERNEL_HEAP) && defined(CONFIG_ARCH_ADDRENV) && \
- defined(CONFIG_MM_PGALLOC) && defined(CONFIG_ARCH_USE_MMU)
+#if defined(CONFIG_BUILD_KERNEL) && defined(__KERNEL__)
/****************************************************************************
* Pre-processor Definitions
@@ -89,4 +88,4 @@ FAR void *kmm_sbrk(intptr_t incr)
return mm_sbrk(&g_kmmheap, incr, UINTPTR_MAX);
}
-#endif /* CONFIG_MM_KERNEL_HEAP && CONFIG_ARCH_ADDRENV && ... */
+#endif /* CONFIG_BUILD_KERNEL && __KERNEL__ */
diff --git a/nuttx/mm/mm_sbrk.c b/nuttx/mm/mm_sbrk.c
index 5d81250fa..dc4c0318e 100644
--- a/nuttx/mm/mm_sbrk.c
+++ b/nuttx/mm/mm_sbrk.c
@@ -47,8 +47,7 @@
#include <nuttx/mm.h>
#include <nuttx/pgalloc.h>
-#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_MM_PGALLOC) && \
- defined(CONFIG_ARCH_USE_MMU)
+#ifdef CONFIG_BUILD_KERNEL
/****************************************************************************
* Pre-processor Definitions
@@ -166,4 +165,4 @@ errout:
set_errno(err);
return (FAR void *)-1;
}
-#endif /* CONFIG_ARCH_ADDRENV && CONFIG_MM_PGALLOC && CONFIG_ARCH_USE_MMU */
+#endif /* CONFIG_BUILD_KERNEL */
diff --git a/nuttx/mm/umm_malloc.c b/nuttx/mm/umm_malloc.c
index 31511b82f..972b214de 100644
--- a/nuttx/mm/umm_malloc.c
+++ b/nuttx/mm/umm_malloc.c
@@ -50,7 +50,7 @@
* Pre-processor Definitions
****************************************************************************/
-#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL)
+#ifdef CONFIG_BUILD_KERNEL
/* In the kernel build, there a multiple user heaps; one for each task
* group. In this build configuration, the user heap structure lies
* in a reserved region at the beginning of the .bss/.data address
@@ -103,7 +103,7 @@
FAR void *malloc(size_t size)
{
-#ifdef CONFIG_ARCH_ADDRENV
+#ifdef CONFIG_BUILD_KERNEL
FAR void *brkaddr;
FAR void *mem;
diff --git a/nuttx/mm/umm_sbrk.c b/nuttx/mm/umm_sbrk.c
index bb74385ee..1e6eaf5c3 100644
--- a/nuttx/mm/umm_sbrk.c
+++ b/nuttx/mm/umm_sbrk.c
@@ -42,17 +42,15 @@
#include <unistd.h>
#include <nuttx/mm.h>
+#include <nuttx/addrenv.h>
#include <nuttx/pgalloc.h>
-#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_MM_PGALLOC) && \
- defined(CONFIG_ARCH_USE_MMU) && (!defined(CONFIG_BUILD_PROTECTED) || \
- !defined(__KERNEL__))
+#if defined(CONFIG_BUILD_KERNEL) && !defined(__KERNEL__)
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
-#if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_BUILD_KERNEL)
/* In the kernel build, there a multiple user heaps; one for each task
* group. In this build configuration, the user heap structure lies
* in a reserved region at the beginning of the .bss/.data address
@@ -60,14 +58,7 @@
* ARCH_DATA_RESERVE_SIZE
*/
-# include <nuttx/addrenv.h>
-# define USR_HEAP (&ARCH_DATA_RESERVE->ar_usrheap)
-
-#else
-/* Otherwise, the user heap data structures are in common .bss */
-
-# define USR_HEAP &g_mmheap
-#endif
+#define USR_HEAP (&ARCH_DATA_RESERVE->ar_usrheap)
/****************************************************************************
* Public Functions
@@ -110,4 +101,4 @@ FAR void *sbrk(intptr_t incr)
return mm_sbrk(USR_HEAP, incr, CONFIG_ARCH_HEAP_NPAGES << MM_PGSHIFT);
}
-#endif /* CONFIG_ARCH_ADDRENV && CONFIG_MM_PGALLOC && ... */
+#endif /* CONFIG_BUILD_KERNEL && !__KERNEL__ */