Bug fix: don't freak out if anonymous mmap fails,
authorOrion Lawlor <olawlor@acm.org>
Mon, 13 Oct 2003 22:52:03 +0000 (22:52 +0000)
committerOrion Lawlor <olawlor@acm.org>
Mon, 13 Oct 2003 22:52:03 +0000 (22:52 +0000)
just disable isomalloc.

src/conv-core/isomalloc.c

index 16dce13e3f1572c08c48ebb9c62b43a12f982e1b..8806f7a12c7885bb38760aca764d907185adae54 100644 (file)
@@ -320,7 +320,9 @@ static void *call_mmap_anywhere(size_t len) {
 
 /* Unmaps this address range */
 static void call_munmap(void *addr,size_t len) {
-  int retval = munmap(addr, len);
+  int retval;
+  if (addr == 0) return; /* NULL address is never mapped */ 
+  retval = munmap(addr, len);
   if (retval==(-1))
     CmiAbort("munmap call failed to deallocate requested memory.\n");
 }