[svn:parrot] r49595 - branches/generational_gc/src/gc

bacek at svn.parrot.org bacek at svn.parrot.org
Wed Oct 20 06:25:08 UTC 2010


Author: bacek
Date: Wed Oct 20 06:25:08 2010
New Revision: 49595
URL: https://trac.parrot.org/parrot/changeset/49595

Log:
Use pool_allocated_memory function

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

Modified: branches/generational_gc/src/gc/gc_ms2.c
==============================================================================
--- branches/generational_gc/src/gc/gc_ms2.c	Wed Oct 20 06:24:59 2010	(r49594)
+++ branches/generational_gc/src/gc/gc_ms2.c	Wed Oct 20 06:25:08 2010	(r49595)
@@ -2038,8 +2038,6 @@
 {
 #ifdef DETAIL_MEMORY_DEBUG
     MarkSweep_GC     *self = (MarkSweep_GC *)interp->gc_sys->gc_private;
-    int count = 0;
-    Pool_Allocator_Arena *arena = self->pmc_allocator->top_arena;
 
     fprintf(stderr, "%s\ngen: %d\n0: %d %d\n1: %d %d\n2: %d %d\n",
             header,
@@ -2049,21 +2047,11 @@
             self->objects[2]->count, self->strings[2]->count);
 
 
-
-    while (arena) {
-        count++;
-        arena = arena->next;
-    }
-    fprintf(stderr, "PMC: %d\n", count * GC_FIXED_SIZE_POOL_SIZE);
-
-    arena = self->string_allocator->top_arena;
-    while (arena) {
-        count++;
-        arena = arena->next;
-    }
-    fprintf(stderr, "STRING: %d\n", count * GC_FIXED_SIZE_POOL_SIZE);
+    fprintf(stderr, "PMC: %d\n", Parrot_gc_pool_allocated_size(interp, self->pmc_allocator));
+    fprintf(stderr, "STRING: %d\n", Parrot_gc_pool_allocated_size(interp, self->string_allocator));
 
     fprintf(stderr, "buffers: %d\n", self->string_gc.memory_pool->total_allocated);
+    fprintf(stderr, "const buffers: %d\n", self->string_gc.constant_string_pool->total_allocated);
 
     fprintf(stderr, "\n");
 


More information about the parrot-commits mailing list