--- /build/deb/eglibc-2.13/hurd/hurdmalloc.c	2006-08-17 01:18:26.000000000 +0000
+++ eglibc-2.13/hurd/hurdmalloc.c	2011-12-22 20:50:46.000000000 +0000
@@ -143,6 +143,8 @@
 
 static struct free_list malloc_free_list[NBUCKETS];
 
+static vm_address_t next_free_address;
+
 /* Initialization just sets everything to zero, but might be necessary on a
    machine where spin_lock_init does otherwise, and is necessary when
    running an executable that was written by something like Emacs's unexec.
@@ -162,12 +164,15 @@
 #endif
     }
 
+  vm_allocate(mach_task_self(), &next_free_address, (vm_size_t) 100*1024*1024, TRUE);
+
   /* This not only suppresses a `defined but not used' warning,
      but it is ABSOLUTELY NECESSARY to avoid the hyperclever
      compiler from "optimizing out" the entire function!  */
   (void) &malloc_init;
 }
 
+
 static void
 more_memory(int size, free_list_t fl)
 {
@@ -186,8 +191,10 @@
 		n = 1;
 	}
 
-	r = vm_allocate(mach_task_self(), &where, (vm_size_t) amount, TRUE);
-	assert_perror (r);
+	//r = vm_allocate(mach_task_self(), &where, (vm_size_t) amount, TRUE);
+	//assert_perror (r);
+	where = next_free_address;
+	next_free_address += amount;
 
 	h = (header_t) where;
 	do {
diff -dur /build/deb/eglibc-2.13/malloc/arena.c eglibc-2.13/malloc/arena.c
--- /build/deb/eglibc-2.13/malloc/arena.c	2010-08-19 20:32:31.000000000 +0000
+++ eglibc-2.13/malloc/arena.c	2011-12-24 20:45:30.000000000 +0000
@@ -719,7 +719,7 @@
      anyway). */
   p2 = MAP_FAILED;
   if(aligned_heap_area) {
-    p2 = (char *)MMAP(aligned_heap_area, HEAP_MAX_SIZE, PROT_NONE,
+    p2 = (char *)MMAP(aligned_heap_area, HEAP_MAX_SIZE, PROT_READ|PROT_WRITE,
 		      MAP_PRIVATE|MAP_NORESERVE);
     aligned_heap_area = NULL;
     if (p2 != MAP_FAILED && ((unsigned long)p2 & (HEAP_MAX_SIZE-1))) {
@@ -728,7 +728,7 @@
     }
   }
   if(p2 == MAP_FAILED) {
-    p1 = (char *)MMAP(0, HEAP_MAX_SIZE<<1, PROT_NONE,
+    p1 = (char *)MMAP(0, HEAP_MAX_SIZE<<1, PROT_READ|PROT_WRITE,
 		      MAP_PRIVATE|MAP_NORESERVE);
     if(p1 != MAP_FAILED) {
       p2 = (char *)(((unsigned long)p1 + (HEAP_MAX_SIZE-1))
@@ -742,7 +742,7 @@
     } else {
       /* Try to take the chance that an allocation of only HEAP_MAX_SIZE
 	 is already aligned. */
-      p2 = (char *)MMAP(0, HEAP_MAX_SIZE, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE);
+      p2 = (char *)MMAP(0, HEAP_MAX_SIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_NORESERVE);
       if(p2 == MAP_FAILED)
 	return 0;
       if((unsigned long)p2 & (HEAP_MAX_SIZE-1)) {
@@ -751,10 +751,12 @@
       }
     }
   }
+#if 0
   if(mprotect(p2, size, PROT_READ|PROT_WRITE) != 0) {
     munmap(p2, HEAP_MAX_SIZE);
     return 0;
   }
+#endif
   h = (heap_info *)p2;
   h->size = size;
   h->mprotect_size = size;
@@ -780,10 +782,12 @@
   if((unsigned long) new_size > (unsigned long) HEAP_MAX_SIZE)
     return -1;
   if((unsigned long) new_size > h->mprotect_size) {
+#if 0
     if (mprotect((char *)h + h->mprotect_size,
 		 (unsigned long) new_size - h->mprotect_size,
 		 PROT_READ|PROT_WRITE) != 0)
       return -2;
+#endif
     h->mprotect_size = new_size;
   }
 
@@ -813,7 +817,7 @@
   if (1)
 #endif
     {
-      if((char *)MMAP((char *)h + new_size, diff, PROT_NONE,
+      if((char *)MMAP((char *)h + new_size, diff, PROT_READ|PROT_WRITE,
 		      MAP_PRIVATE|MAP_FIXED) == (char *) MAP_FAILED)
 	return -2;
       h->mprotect_size = new_size;
