diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-10-11 23:54:37 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-10-11 23:54:37 +0000 |
commit | a99617fe8fdb56b3e877558bfd6572ce65ad39de (patch) | |
tree | 26c3182125188cb7681885830ea7e32e179c7565 /libc/stdlib/malloc-simple | |
parent | d1c3ee2a075fc4e855e352e5a5cf10371f2e77aa (diff) |
Finish reorganizing things. At least I think I've finished.
Diffstat (limited to 'libc/stdlib/malloc-simple')
-rw-r--r-- | libc/stdlib/malloc-simple/Makefile | 2 | ||||
-rw-r--r-- | libc/stdlib/malloc-simple/alloc.c | 8 |
2 files changed, 7 insertions, 3 deletions
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; |