[svn:parrot] r47370 - branches/gc_massacre/src/gc

bacek at svn.parrot.org bacek at svn.parrot.org
Sat Jun 5 00:22:20 UTC 2010


Author: bacek
Date: Sat Jun  5 00:22:20 2010
New Revision: 47370
URL: https://trac.parrot.org/parrot/changeset/47370

Log:
Count string allocations as header allocations.

Modified:
   branches/gc_massacre/src/gc/gc_ms2.c

Modified: branches/gc_massacre/src/gc/gc_ms2.c
==============================================================================
--- branches/gc_massacre/src/gc/gc_ms2.c	Sat Jun  5 00:13:08 2010	(r47369)
+++ branches/gc_massacre/src/gc/gc_ms2.c	Sat Jun  5 00:22:20 2010	(r47370)
@@ -716,6 +716,10 @@
     List_Item_Header *ptr;
     STRING           *ret;
 
+    if (++self->header_allocs_since_last_collect > 1024) {
+        gc_ms2_mark_and_sweep(interp, 0);
+    }
+
     ptr = (List_Item_Header *)Parrot_gc_pool_allocate(interp,
         self->string_allocator);
     LIST_APPEND(self->strings, ptr);


More information about the parrot-commits mailing list