/* * Restore unmarked small objects in the block pointed to by hbp * to the appropriate object free list. * If entirely empty blocks are to be completely deallocated, then * caller should perform that check. */ STATIC void GC_reclaim_small_nonempty_block(struct hblk *hbp, GC_bool report_if_found) { hdr *hhdr = HDR(hbp); size_t sz = hhdr -> hb_sz; 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; if (report_if_found) { GC_reclaim_check(hbp, hhdr, sz); } else { *flh = GC_reclaim_generic(hbp, hhdr, sz, ok -> ok_init, *flh, &GC_bytes_found); } }
/* * Restore unmarked small objects in the block pointed to by hbp * to the appropriate object free list. * If entirely empty blocks are to be completely deallocated, then * caller should perform that check. */ void GC_reclaim_small_nonempty_block(struct hblk *hbp, int report_if_found, signed_word *count) { hdr *hhdr = HDR(hbp); size_t sz = hhdr -> hb_sz; int kind = hhdr -> hb_obj_kind; struct obj_kind * ok = &GC_obj_kinds[kind]; void **flh = &(ok -> ok_freelist[BYTES_TO_GRANULES(sz)]); hhdr -> hb_last_reclaimed = (unsigned short) GC_gc_no; if (report_if_found) { GC_reclaim_check(hbp, hhdr, sz); } else { *flh = GC_reclaim_generic(hbp, hhdr, sz, (ok -> ok_init || GC_debugging_started), *flh, &GC_bytes_found); } }