Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 77259:e1cbde058229 | 77260:a6fbfb6a0580 |
|---|---|
| 3613 void *start, *end; | 3613 void *start, *end; |
| 3614 enum mem_type type; | 3614 enum mem_type type; |
| 3615 { | 3615 { |
| 3616 struct mem_node *c, *parent, *x; | 3616 struct mem_node *c, *parent, *x; |
| 3617 | 3617 |
| 3618 if (start < min_heap_address) | 3618 if (min_heap_address == NULL || start < min_heap_address) |
| 3619 min_heap_address = start; | 3619 min_heap_address = start; |
| 3620 if (end > max_heap_address) | 3620 if (max_heap_address == NULL || end > max_heap_address) |
| 3621 max_heap_address = end; | 3621 max_heap_address = end; |
| 3622 | 3622 |
| 3623 /* See where in the tree a node for START belongs. In this | 3623 /* See where in the tree a node for START belongs. In this |
| 3624 particular application, it shouldn't happen that a node is already | 3624 particular application, it shouldn't happen that a node is already |
| 3625 present. For debugging purposes, let's check that. */ | 3625 present. For debugging purposes, let's check that. */ |
