summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc/malloc.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/malloc.c
parentd1c3ee2a075fc4e855e352e5a5cf10371f2e77aa (diff)
Finish reorganizing things. At least I think I've finished.
Diffstat (limited to 'libc/stdlib/malloc/malloc.c')
-rw-r--r--libc/stdlib/malloc/malloc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c
index 1a0b61aa5..4ed9fe873 100644
--- a/libc/stdlib/malloc/malloc.c
+++ b/libc/stdlib/malloc/malloc.c
@@ -190,7 +190,13 @@ static void *hunk_alloc(int size)
if ((p = free_h[size]) == NULL)
{
if ((p = (Hunk_t*)mmap(HUNK_MSTART,HUNK_MSIZE,PROT_READ|PROT_WRITE,
- MAP_PRIVATE|MAP_ANON,0,0)) == (Hunk_t*)MAP_FAILED)
+#ifdef __HAS_NO_MMU__
+ MAP_PRIVATE|MAP_ANONYMOUS
+#else
+
+ MAP_SHARED|MAP_ANONYMOUS
+#endif
+ ,0,0)) == (Hunk_t*)MAP_FAILED)
return NULL;
memset(p,0,HUNK_MSIZE);
p->id = HUNK_ID;