summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc-simple/alloc.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-01-16 13:43:30 +0000
committerEric Andersen <andersen@codepoet.org>2004-01-16 13:43:30 +0000
commit338237994ac93ca58f6024ef0f7932ab770735d1 (patch)
tree4417f2f77bc3224e09979303a45e2cd76c5d14be /libc/stdlib/malloc-simple/alloc.c
parent76374f68fbc07420cd459b0d0fae424895ea4141 (diff)
s/UCLIBC_HAS_MMU/ARCH_HAS_MMU/g
Diffstat (limited to 'libc/stdlib/malloc-simple/alloc.c')
-rw-r--r--libc/stdlib/malloc-simple/alloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c
index 4c6edd1f9..c0f702676 100644
--- a/libc/stdlib/malloc-simple/alloc.c
+++ b/libc/stdlib/malloc-simple/alloc.c
@@ -31,7 +31,7 @@ void *malloc(size_t size)
#endif
}
-#ifdef __UCLIBC_HAS_MMU__
+#ifdef __ARCH_HAS_MMU__
result = mmap((void *) 0, size + sizeof(size_t), PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (result == MAP_FAILED)
@@ -88,7 +88,7 @@ void *realloc(void *ptr, size_t size)
newptr = malloc(size);
if (newptr) {
memcpy(newptr, ptr,
-#ifdef __UCLIBC_HAS_MMU__
+#ifdef __ARCH_HAS_MMU__
*((size_t *) (ptr - sizeof(size_t)))
#else
size
@@ -111,7 +111,7 @@ void free(void *ptr)
return;
}
}
-#ifdef __UCLIBC_HAS_MMU__
+#ifdef __ARCH_HAS_MMU__
ptr -= sizeof(size_t);
munmap(ptr, * (size_t *) ptr + sizeof(size_t));
#else
@@ -154,7 +154,7 @@ int __libc_free_aligned(void *ptr)
/* Mark the block as free */
l->aligned = NULL;
ptr = l->exact;
-#ifdef __UCLIBC_HAS_MMU__
+#ifdef __ARCH_HAS_MMU__
ptr -= sizeof(size_t);
munmap(ptr, * (size_t *) ptr + sizeof(size_t));
#else