summaryrefslogtreecommitdiff
path: root/reclaim.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-05-05 07:24:48 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:58 +0200
commitb898fa85675826496de2c476276ff8ca4af756bf (patch)
tree387dd91ea9c61c5076b89055dc5d63219697270e /reclaim.c
parent1d242bf67846646f8abb2705a349917f158d3319 (diff)
2011-05-05 Ivan Maidanski <ivmai@mail.ru>
* dbg_mlc.c (GC_has_other_debug_info): Fix punctuation in the comment. * dbg_mlc.c (GC_FREED_MEM_MARKER): New macro. * dbg_mlc.c (GC_debug_free): Use GC_FREED_MEM_MARKER. * dbg_mlc.c (GC_smashed): Refine documentation. * mark.c (GC_push_selected): Change dirty_fn return type to GC_bool. * os_dep.c (GC_page_was_ever_dirty): Make GC_INNER. * reclaim.c (GC_reclaim_small_nonempty_block): Remove "kind" local variable. * reclaim.c (GC_reclaim_block): Pass true constant to GC_reclaim_small_nonempty_block (instead of report_if_found). * doc/README.autoconf: Update; fix a typo. * include/private/gcconfig.h (GC_WORD_C): New macro.
Diffstat (limited to 'reclaim.c')
-rw-r--r--reclaim.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/reclaim.c b/reclaim.c
index 6a204f7..f9bfd85 100644
--- a/reclaim.c
+++ b/reclaim.c
@@ -254,8 +254,7 @@ STATIC void GC_reclaim_small_nonempty_block(struct hblk *hbp,
{
hdr *hhdr = HDR(hbp);
size_t sz = hhdr -> hb_sz;
- int kind = hhdr -> hb_obj_kind;
- struct obj_kind * ok = &GC_obj_kinds[kind];
+ struct obj_kind * ok = &GC_obj_kinds[hhdr -> hb_obj_kind];
void **flh = &(ok -> ok_freelist[BYTES_TO_GRANULES(sz)]);
hhdr -> hb_last_reclaimed = (unsigned short) GC_gc_no;
@@ -263,8 +262,7 @@ STATIC void GC_reclaim_small_nonempty_block(struct hblk *hbp,
if (report_if_found) {
GC_reclaim_check(hbp, hhdr, sz);
} else {
- *flh = GC_reclaim_generic(hbp, hhdr, sz,
- ok -> ok_init,
+ *flh = GC_reclaim_generic(hbp, hhdr, sz, ok -> ok_init,
*flh, &GC_bytes_found);
}
}
@@ -322,7 +320,7 @@ STATIC void GC_reclaim_block(struct hblk *hbp, word report_if_found)
GC_atomic_in_use += sz * hhdr -> hb_n_marks;
}
if (report_if_found) {
- GC_reclaim_small_nonempty_block(hbp, (GC_bool)report_if_found);
+ GC_reclaim_small_nonempty_block(hbp, TRUE /* report_if_found */);
} else if (empty) {
GC_bytes_found += HBLKSIZE;
GC_freehblk(hbp);