summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/malloc-simple/alloc.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-10-11 23:54:37 +0000
committerEric Andersen <andersen@codepoet.org>2000-10-11 23:54:37 +0000
commita99617fe8fdb56b3e877558bfd6572ce65ad39de (patch)
tree26c3182125188cb7681885830ea7e32e179c7565 /libc/stdlib/malloc-simple/alloc.c
parentd1c3ee2a075fc4e855e352e5a5cf10371f2e77aa (diff)
downloaduClibc-alpine-a99617fe8fdb56b3e877558bfd6572ce65ad39de.tar.bz2
uClibc-alpine-a99617fe8fdb56b3e877558bfd6572ce65ad39de.tar.xz
Finish reorganizing things. At least I think I've finished.
Diffstat (limited to 'libc/stdlib/malloc-simple/alloc.c')
-rw-r--r--libc/stdlib/malloc-simple/alloc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c
index cf4835c97..f31105d4e 100644
--- a/libc/stdlib/malloc-simple/alloc.c
+++ b/libc/stdlib/malloc-simple/alloc.c
@@ -67,8 +67,12 @@ void *calloc(size_t num, size_t size)
void *malloc(size_t len)
{
void *result = mmap((void *) 0, len, PROT_READ | PROT_WRITE,
- //MAP_SHARED | MAP_ANONYMOUS, 0, 0);
- MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);
+#ifdef __HAS_NO_MMU__
+ MAP_SHARED | MAP_ANONYMOUS, 0, 0
+#else
+ MAP_PRIVATE | MAP_ANONYMOUS, 0, 0
+#endif
+ );
if (result == (void *) -1)
return 0;