From: hboehm Date: Sat, 30 Jun 2007 05:49:31 +0000 (+0000) Subject: 2007-06-29 Hans Boehm X-Git-Tag: gc7_0~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff97a96866512f7f642a0c3addc4ba2b36b3ee12;p=gc 2007-06-29 Hans Boehm * backgraph.c (per_object_func): Make argument types consistent. (GC_traverse_back_graph): Mark GC_deepest_obj. --- diff --git a/ChangeLog b/ChangeLog index a18cdee6..a68569ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-06-29 Hans Boehm + + * backgraph.c (per_object_func): Make argument types consistent. + (GC_traverse_back_graph): Mark GC_deepest_obj. + 2007-06-29 Hans Boehm * finalize.c (GC_finalize): Change dl_size and fo_size to size_t. diff --git a/backgraph.c b/backgraph.c index 4c5623fb..59c330f4 100644 --- a/backgraph.c +++ b/backgraph.c @@ -254,7 +254,7 @@ static void add_edge(ptr_t p, ptr_t q) } } -typedef void (*per_object_func)(ptr_t p, word n_bytes, word gc_descr); +typedef void (*per_object_func)(ptr_t p, size_t n_bytes, word gc_descr); static void per_object_helper(struct hblk *h, word fn) { @@ -275,7 +275,7 @@ void GC_apply_to_each_object(per_object_func f) GC_apply_to_all_blocks(per_object_helper, (word)f); } -static void reset_back_edge(ptr_t p, word n_bytes, word gc_descr) +static void reset_back_edge(ptr_t p, size_t n_bytes, word gc_descr) { /* Skip any free list links, or dropped blocks */ if (GC_HAS_DEBUG_INFO(p)) { @@ -392,7 +392,7 @@ ptr_t GC_deepest_obj; /* next GC. */ /* Set GC_max_height to be the maximum height we encounter, and */ /* GC_deepest_obj to be the corresponding object. */ -static void update_max_height(ptr_t p, word n_bytes, word gc_descr) +static void update_max_height(ptr_t p, size_t n_bytes, word gc_descr) { if (GC_is_marked(p) && GC_HAS_DEBUG_INFO(p)) { int i; @@ -444,6 +444,8 @@ void GC_traverse_back_graph(void) { GC_max_height = 0; GC_apply_to_each_object(update_max_height); + if (0 != GC_deepest_obj) + GC_set_mark_bit(GC_deepest_obj); /* Keep it until we can print it. */ } void GC_print_back_graph_stats(void)