[svn:parrot] r49051 - in branches/string_gc_encapsulate/src: . gc

bacek at svn.parrot.org bacek at svn.parrot.org
Thu Sep 16 10:59:59 UTC 2010


Author: bacek
Date: Thu Sep 16 10:59:59 2010
New Revision: 49051
URL: https://trac.parrot.org/parrot/changeset/49051

Log:
Introduce Parrot_gc_str_compact_pool

Modified:
   branches/string_gc_encapsulate/src/debug.c
   branches/string_gc_encapsulate/src/gc/gc_ms.c
   branches/string_gc_encapsulate/src/gc/gc_private.h
   branches/string_gc_encapsulate/src/gc/string_gc.c

Modified: branches/string_gc_encapsulate/src/debug.c
==============================================================================
--- branches/string_gc_encapsulate/src/debug.c	Thu Sep 16 10:59:16 2010	(r49050)
+++ branches/string_gc_encapsulate/src/debug.c	Thu Sep 16 10:59:59 2010	(r49051)
@@ -82,7 +82,8 @@
 static void debugger_cmdline(PARROT_INTERP)
         __attribute__nonnull__(1);
 
-static void display_breakpoint(ARGIN(PDB_t *pdb),
+static void display_breakpoint(
+    ARGIN(PDB_t *pdb),
     ARGIN(const PDB_breakpoint_t *breakpoint))
         __attribute__nonnull__(1)
         __attribute__nonnull__(2);

Modified: branches/string_gc_encapsulate/src/gc/gc_ms.c
==============================================================================
--- branches/string_gc_encapsulate/src/gc/gc_ms.c	Thu Sep 16 10:59:16 2010	(r49050)
+++ branches/string_gc_encapsulate/src/gc/gc_ms.c	Thu Sep 16 10:59:59 2010	(r49051)
@@ -606,7 +606,7 @@
 gc_ms_compact_memory_pool(PARROT_INTERP)
 {
     ASSERT_ARGS(gc_ms_compact_memory_pool)
-    compact_pool(interp, interp->mem_pools, interp->mem_pools->memory_pool);
+    Parrot_gc_str_compact_pool(interp, &interp->mem_pools->string_gc);
 }
 
 /*

Modified: branches/string_gc_encapsulate/src/gc/gc_private.h
==============================================================================
--- branches/string_gc_encapsulate/src/gc/gc_private.h	Thu Sep 16 10:59:16 2010	(r49050)
+++ branches/string_gc_encapsulate/src/gc/gc_private.h	Thu Sep 16 10:59:59 2010	(r49051)
@@ -700,6 +700,10 @@
         __attribute__nonnull__(2)
         FUNC_MODIFIES(*str);
 
+void Parrot_gc_str_compact_pool(PARROT_INTERP, ARGIN(String_GC *gc))
+        __attribute__nonnull__(1)
+        __attribute__nonnull__(2);
+
 void Parrot_gc_str_reallocate_buffer_storage(PARROT_INTERP,
     ARGMOD(Buffer *buffer),
     size_t newsize)
@@ -722,6 +726,9 @@
      __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \
     , PARROT_ASSERT_ARG(str))
+#define ASSERT_ARGS_Parrot_gc_str_compact_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+       PARROT_ASSERT_ARG(interp) \
+    , PARROT_ASSERT_ARG(gc))
 #define ASSERT_ARGS_Parrot_gc_str_reallocate_buffer_storage \
      __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
        PARROT_ASSERT_ARG(interp) \

Modified: branches/string_gc_encapsulate/src/gc/string_gc.c
==============================================================================
--- branches/string_gc_encapsulate/src/gc/string_gc.c	Thu Sep 16 10:59:16 2010	(r49050)
+++ branches/string_gc_encapsulate/src/gc/string_gc.c	Thu Sep 16 10:59:59 2010	(r49051)
@@ -251,6 +251,20 @@
 }
 
 /*
+=item C<void Parrot_gc_str_compact_pool(PARROT_INTERP, String_GC *gc)>
+
+Compact string pool.
+
+=cut
+*/
+void
+Parrot_gc_str_compact_pool(PARROT_INTERP, ARGIN(String_GC *gc))
+{
+    ASSERT_ARGS(Parrot_gc_str_compact_pool)
+    compact_pool(interp, interp->mem_pools, gc->memory_pool);
+}
+
+/*
 
 =back
 


More information about the parrot-commits mailing list