summaryrefslogtreecommitdiff
path: root/reclaim.c
diff options
context:
space:
mode:
authorhboehm <hboehm>2008-09-11 03:37:57 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:43 +0200
commit9567fad48b54e60255aa52f60bc43af95da77b33 (patch)
treec9fb0ca314c9f1fcc0a2bcb276cdfe75895d9562 /reclaim.c
parent2ceea97cdf78c8a1c575a5002457d7cd648e740e (diff)
2008-09-10 Hans Boehm <Hans.Boehm@hp.com>
* dbg_mlc.c (GC_print_smashed_obj): Increase robustness with smashed string, (GC_debug_free_inner): Mark as free. * mallocx.c (GC_malloc_many): Always clear new block if GC_debugging_started. * reclaim.c: Move GC_debugging_started from GC_reclaim_small_nonempty_block() to GC_reclaim_generic(), which is also called directly. * doc/README: Fix spelling error. Update license summary. * include/gc.h (GC_PRE_INCR3, GC_POST_INCR3): add (void **) casts. * tests/test.c: Don't define GC_DEBUG if already defined.
Diffstat (limited to 'reclaim.c')
-rw-r--r--reclaim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/reclaim.c b/reclaim.c
index 0b01b1a..13db28d 100644
--- a/reclaim.c
+++ b/reclaim.c
@@ -216,7 +216,7 @@ ptr_t GC_reclaim_generic(struct hblk * hbp, hdr *hhdr, size_t sz,
GC_ASSERT(GC_find_header((ptr_t)hbp) == hhdr);
GC_remove_protection(hbp, 1, (hhdr)->hb_descr == 0 /* Pointer-free? */);
- if (init) {
+ if (init || GC_debugging_started) {
result = GC_reclaim_clear(hbp, hhdr, sz, list, count);
} else {
GC_ASSERT((hhdr)->hb_descr == 0 /* Pointer-free block */);
@@ -247,7 +247,7 @@ STATIC void GC_reclaim_small_nonempty_block(struct hblk *hbp,
GC_reclaim_check(hbp, hhdr, sz);
} else {
*flh = GC_reclaim_generic(hbp, hhdr, sz,
- (ok -> ok_init || GC_debugging_started),
+ ok -> ok_init,
*flh, &GC_bytes_found);
}
}