Browse Source

Fixed the parameters to mmap in malloc.
malloc now works, but wastes alot of memory with the minimum
amount of memory used for each allocation being 4k.

Ron Alder 25 years ago
parent
commit
bc5ac6bc3d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libc/stdlib/malloc/alloc.c

+ 1 - 1
libc/stdlib/malloc/alloc.c

@@ -62,7 +62,7 @@ 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);
   if (result == (void*)-1)
     return 0;