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

bacek at svn.parrot.org bacek at svn.parrot.org
Mon Sep 20 09:50:21 UTC 2010


Author: bacek
Date: Mon Sep 20 09:50:21 2010
New Revision: 49165
URL: https://trac.parrot.org/parrot/changeset/49165

Log:
Count used memory during allocattion of String storage.

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	Mon Sep 20 09:49:51 2010	(r49164)
+++ branches/gc_massacre/src/gc/gc_ms2.c	Mon Sep 20 09:50:21 2010	(r49165)
@@ -869,6 +869,7 @@
     ASSERT_ARGS(gc_ms_allocate_string_storage)
     MarkSweep_GC *self = (MarkSweep_GC *)interp->gc_sys->gc_private;
     Parrot_gc_str_allocate_string_storage(interp, &self->string_gc, str, size);
+    self->stats.mem_used_last_collect += size;
 }
 
 static void
@@ -877,6 +878,7 @@
     ASSERT_ARGS(gc_ms_reallocate_string_storage)
     MarkSweep_GC *self = (MarkSweep_GC *)interp->gc_sys->gc_private;
     Parrot_gc_str_reallocate_string_storage(interp, &self->string_gc, str, size);
+    self->stats.mem_used_last_collect += size;
 }
 
 static void
@@ -885,6 +887,7 @@
     ASSERT_ARGS(gc_ms_allocate_buffer_storage)
     MarkSweep_GC *self = (MarkSweep_GC *)interp->gc_sys->gc_private;
     Parrot_gc_str_allocate_buffer_storage(interp, &self->string_gc, str, size);
+    self->stats.mem_used_last_collect += size;
 }
 
 static void
@@ -893,6 +896,7 @@
     ASSERT_ARGS(gc_ms_reallocate_buffer_storage)
     MarkSweep_GC *self = (MarkSweep_GC *)interp->gc_sys->gc_private;
     Parrot_gc_str_reallocate_buffer_storage(interp, &self->string_gc, str, size);
+    self->stats.mem_used_last_collect += size;
 }
 
 /*


More information about the parrot-commits mailing list