summaryrefslogtreecommitdiff
path: root/new_hblk.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-07-26 15:09:22 +0400
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 15:09:22 +0400
commitf9b1aa2161e755a5f5b772b5698aab8a63d0bef4 (patch)
tree1353072248edd6eb43149a47cc3b2a65d61fd569 /new_hblk.c
parent2d90eba35546e0aa17a1014026ddbf4f523cad85 (diff)
downloadbdwgc-f9b1aa2161e755a5f5b772b5698aab8a63d0bef4.tar.gz
gc4.11 tarball importgc4_11
Diffstat (limited to 'new_hblk.c')
-rw-r--r--new_hblk.c7
1 files changed, 6 insertions, 1 deletions
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