Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Unity-Technologies/bdwgc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhboehm <hboehm>2007-06-30 09:49:31 +0400
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:41 +0400
commitff97a96866512f7f642a0c3addc4ba2b36b3ee12 (patch)
treef70a2be6682a4f56cf6f34adf6551b949499180a /backgraph.c
parent88c7642c0af1b91a516e9de45040f3050a797228 (diff)
2007-06-29 Hans Boehm <Hans.Boehm@hp.com>
* backgraph.c (per_object_func): Make argument types consistent. (GC_traverse_back_graph): Mark GC_deepest_obj.
Diffstat (limited to 'backgraph.c')
-rw-r--r--backgraph.c8
1 files changed, 5 insertions, 3 deletions
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)