From f9b1aa2161e755a5f5b772b5698aab8a63d0bef4 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Tue, 26 Jul 2011 15:09:22 +0400 Subject: gc4.11 tarball import --- new_hblk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'new_hblk.c') diff --git a/new_hblk.c b/new_hblk.c index 436c38fc..af657f41 100644 --- a/new_hblk.c +++ b/new_hblk.c @@ -152,7 +152,9 @@ ptr_t ofl; /* * Allocate a new heapblock for small objects of size n. * Add all of the heapblock's objects to the free list for objects - * of that size. Will fail to do anything if we are out of memory. + * of that size. + * Set all mark bits if objects are uncollectable. + * Will fail to do anything if we are out of memory. */ void GC_new_hblk(sz, kind) register word sz; @@ -174,6 +176,9 @@ int kind; h = GC_allochblk(sz, kind, 0); if (h == 0) return; + /* Mark all objects if appropriate. */ + if (IS_UNCOLLECTABLE(kind)) GC_set_hdr_marks(HDR(h)); + /* Handle small objects sizes more efficiently. For larger objects */ /* the difference is less significant. */ # ifndef SMALL_CONFIG -- cgit v1.2.1