[svn:parrot] r44229 - branches/sys_mem_reduce/src/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Sat Feb 20 12:17:31 UTC 2010


Author: bacek
Date: Sat Feb 20 12:17:31 2010
New Revision: 44229
URL: https://trac.parrot.org/parrot/changeset/44229

Log:
Switch ParrotInterpreter PMC to GC allocations

Modified:
   branches/sys_mem_reduce/src/pmc/parrotinterpreter.pmc

Modified: branches/sys_mem_reduce/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/sys_mem_reduce/src/pmc/parrotinterpreter.pmc	Sat Feb 20 12:17:13 2010	(r44228)
+++ branches/sys_mem_reduce/src/pmc/parrotinterpreter.pmc	Sat Feb 20 12:17:31 2010	(r44229)
@@ -238,7 +238,7 @@
          */
         if (!PMC_data(SELF)) {
             Parrot_ParrotInterpreter_attributes *attrs =
-                mem_allocate_zeroed_typed(Parrot_ParrotInterpreter_attributes);
+                mem_gc_allocate_zeroed_typed(INTERP, Parrot_ParrotInterpreter_attributes);
             PMC_data(SELF) = attrs;
         }
         if (!PMC_interp(SELF)) {
@@ -264,7 +264,7 @@
 
         if (!PMC_data(SELF)) {
             Parrot_ParrotInterpreter_attributes *attrs =
-                mem_allocate_zeroed_typed(Parrot_ParrotInterpreter_attributes);
+                mem_gc_allocate_zeroed_typed(INTERP, Parrot_ParrotInterpreter_attributes);
             PMC_data(SELF) = attrs;
         }
         if (!PMC_interp(SELF)) {
@@ -286,7 +286,7 @@
 
     VTABLE void destroy() {
         if (PMC_data(SELF)) {
-            mem_sys_free(PMC_data(SELF));
+            mem_gc_free(INTERP, PMC_data(SELF));
             PMC_data(SELF) = NULL;
         }
     }
@@ -309,7 +309,7 @@
          * initialized, cheat by initializing instead. */
         if (!PMC_data(SELF)) {
             Parrot_ParrotInterpreter_attributes *attrs =
-                mem_allocate_zeroed_typed(Parrot_ParrotInterpreter_attributes);
+                mem_gc_allocate_zeroed_typed(INTERP, Parrot_ParrotInterpreter_attributes);
             PMC_data(SELF) = attrs;
             PObj_custom_destroy_SET(SELF);
         }
@@ -719,7 +719,7 @@
     VTABLE void thaw(PMC *info) {
         if (!PMC_data(SELF)) {
             Parrot_ParrotInterpreter_attributes *attrs =
-                mem_allocate_zeroed_typed(Parrot_ParrotInterpreter_attributes);
+                mem_gc_allocate_zeroed_typed(INTERP, Parrot_ParrotInterpreter_attributes);
             PMC_data(SELF) = attrs;
             PObj_custom_destroy_SET(SELF);
         }


More information about the parrot-commits mailing list