Skip to content

Commit

Permalink
(mem_insert): Set min_heap_address and max_heap_address
Browse files Browse the repository at this point in the history
if they are not yet initialized.
  • Loading branch information
mituharu committed Apr 16, 2007
1 parent 74811c9 commit a143eea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/alloc.c
Expand Up @@ -3615,9 +3615,9 @@ mem_insert (start, end, type)
{
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
Expand Down

0 comments on commit a143eea

Please sign in to comment.