From a99617fe8fdb56b3e877558bfd6572ce65ad39de Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 11 Oct 2000 23:54:37 +0000 Subject: Finish reorganizing things. At least I think I've finished. --- libc/stdlib/malloc-simple/Makefile | 2 +- libc/stdlib/malloc-simple/alloc.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'libc/stdlib/malloc-simple') diff --git a/libc/stdlib/malloc-simple/Makefile b/libc/stdlib/malloc-simple/Makefile index c2f8827b5..e46415536 100644 --- a/libc/stdlib/malloc-simple/Makefile +++ b/libc/stdlib/malloc-simple/Makefile @@ -20,7 +20,7 @@ # other sundry sources. Files within this library are copyright by their # respective copyright holders. -TOPDIR=../ +TOPDIR=../../ include $(TOPDIR)Rules.make LIBC=$(TOPDIR)libc.a 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; -- cgit v1.2.3