diff src/alloc.c @ 77260:a6fbfb6a0580

(mem_insert): Set min_heap_address and max_heap_address if they are not yet initialized.
author YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
date Mon, 16 Apr 2007 03:09:33 +0000
parents b176aeeb7253
children 922696f363b0 1842d7137ff2 dc002877ce12 e6fdae9180d4
line wrap: on
line diff
--- a/src/alloc.c	Mon Apr 16 02:57:52 2007 +0000
+++ b/src/alloc.c	Mon Apr 16 03:09:33 2007 +0000
@@ -3615,9 +3615,9 @@
 {
   struct mem_node *c, *parent, *x;
 
-  if (start < min_heap_address)
+  if (min_heap_address == NULL || start < min_heap_address)
     min_heap_address = start;
-  if (end > max_heap_address)
+  if (max_heap_address == NULL || end > max_heap_address)
     max_heap_address = end;
 
   /* See where in the tree a node for START belongs.  In this