From 12c142f2b0b6675420eafcbcf9b53db0d9617d19 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 4 Aug 2022 10:08:09 +0300 Subject: New GC_count_set_marks_in_hblk API function Issue #460 (bdwgc). Note: available on if the collector is built without NO_DEBUGGING. * include/gc/gc_mark.h (GC_count_set_marks_in_hblk): New API function. * reclaim.c [!NO_DEBUGGING] (GC_count_set_marks_in_hblk): Implement. * tests/gctest.c [!PCR && !GC_WIN32_THREADS && !GC_PTHREADS && CPPCHECK && !NO_DEBUGGING] (main): Call UNTESTED(GC_count_set_marks_in_hblk). --- reclaim.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'reclaim.c') diff --git a/reclaim.c b/reclaim.c index b847fdaf..d3118a38 100644 --- a/reclaim.c +++ b/reclaim.c @@ -561,6 +561,10 @@ unsigned GC_n_set_marks(hdr *hhdr) #endif /* !USE_MARK_BYTES */ +GC_API unsigned GC_CALL GC_count_set_marks_in_hblk(const void *p) { + return GC_n_set_marks(HDR(p)); +} + STATIC void GC_CALLBACK GC_print_block_descr(struct hblk *h, GC_word /* struct PrintStats */ raw_ps) { -- cgit v1.2.1