[svn:parrot] r38843 - trunk/src/gc
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Sat May 16 20:52:25 UTC 2009
Author: whiteknight
Date: Sat May 16 20:52:24 2009
New Revision: 38843
URL: https://trac.parrot.org/parrot/changeset/38843
Log:
[gc] rename Parrot_gc_sweep to Parrot_gc_sweep_pool, since that's a more accurate description for what it does
Modified:
trunk/src/gc/api.c
trunk/src/gc/gc_malloc.c
trunk/src/gc/gc_ms.c
trunk/src/gc/gc_private.h
trunk/src/gc/incremental_ms.c
trunk/src/gc/mark_sweep.c
Modified: trunk/src/gc/api.c
==============================================================================
--- trunk/src/gc/api.c Sat May 16 20:49:38 2009 (r38842)
+++ trunk/src/gc/api.c Sat May 16 20:52:24 2009 (r38843)
@@ -884,7 +884,7 @@
flag, void *arg)>
Performs a garbage collection sweep of the given pmc pool, then frees it. Calls
-C<Parrot_gc_sweep> to perform the sweep, and C<free_pool> to free the pool and
+C<Parrot_gc_sweep_pool> to perform the sweep, and C<free_pool> to free the pool and
all its arenas. Always returns C<0>.
=cut
@@ -895,7 +895,7 @@
sweep_cb_pmc(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool),
SHIM(int flag), SHIM(void *arg))
{
- Parrot_gc_sweep(interp, pool);
+ Parrot_gc_sweep_pool(interp, pool);
free_pool(pool);
return 0;
}
@@ -906,7 +906,7 @@
flag, void *arg)>
Performs a final garbage collection sweep, then frees the pool. Calls
-C<Parrot_gc_sweep> to perform the sweep, and C<free_pool> to free the pool and
+C<Parrot_gc_sweep_pool> to perform the sweep, and C<free_pool> to free the pool and
all its arenas.
=cut
@@ -929,7 +929,7 @@
{
UNUSED(arg);
- Parrot_gc_sweep(interp, pool);
+ Parrot_gc_sweep_pool(interp, pool);
free_pool(pool);
}
Modified: trunk/src/gc/gc_malloc.c
==============================================================================
--- trunk/src/gc/gc_malloc.c Sat May 16 20:49:38 2009 (r38842)
+++ trunk/src/gc/gc_malloc.c Sat May 16 20:52:24 2009 (r38843)
@@ -77,7 +77,7 @@
if (flag & POOL_BUFFER)
used_cow(interp, pool, 0);
- Parrot_gc_sweep(interp, pool);
+ Parrot_gc_sweep_pool(interp, pool);
if (flag & POOL_BUFFER)
clear_cow(interp, pool, 0);
Modified: trunk/src/gc/gc_ms.c
==============================================================================
--- trunk/src/gc/gc_ms.c Sat May 16 20:49:38 2009 (r38842)
+++ trunk/src/gc/gc_ms.c Sat May 16 20:52:24 2009 (r38843)
@@ -193,12 +193,12 @@
if (interp->scheduler) {
Parrot_gc_mark_PObj_alive(interp, (PObj *)interp->scheduler);
VTABLE_mark(interp, interp->scheduler);
- Parrot_gc_sweep(interp, interp->arena_base->pmc_pool);
+ Parrot_gc_sweep_pool(interp, interp->arena_base->pmc_pool);
}
/* now sweep everything that's left */
- Parrot_gc_sweep(interp, interp->arena_base->pmc_pool);
- Parrot_gc_sweep(interp, interp->arena_base->constant_pmc_pool);
+ Parrot_gc_sweep_pool(interp, interp->arena_base->pmc_pool);
+ Parrot_gc_sweep_pool(interp, interp->arena_base->constant_pmc_pool);
return;
}
@@ -271,7 +271,7 @@
ASSERT_ARGS(sweep_cb)
int * const total_free = (int *) arg;
- Parrot_gc_sweep(interp, pool);
+ Parrot_gc_sweep_pool(interp, pool);
if (interp->profile && (flag & POOL_PMC))
Parrot_gc_profile_end(interp, PARROT_PROF_GC_cp);
Modified: trunk/src/gc/gc_private.h
==============================================================================
--- trunk/src/gc/gc_private.h Sat May 16 20:49:38 2009 (r38842)
+++ trunk/src/gc/gc_private.h Sat May 16 20:52:24 2009 (r38843)
@@ -349,7 +349,7 @@
void Parrot_gc_run_init(PARROT_INTERP)
__attribute__nonnull__(1);
-void Parrot_gc_sweep(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool))
+void Parrot_gc_sweep_pool(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*pool);
@@ -386,7 +386,7 @@
|| PARROT_ASSERT_ARG(pool)
#define ASSERT_ARGS_Parrot_gc_run_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp)
-#define ASSERT_ARGS_Parrot_gc_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+#define ASSERT_ARGS_Parrot_gc_sweep_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(pool)
#define ASSERT_ARGS_Parrot_gc_trace_children __attribute__unused__ int _ASSERT_ARGS_CHECK = \
Modified: trunk/src/gc/incremental_ms.c
==============================================================================
--- trunk/src/gc/incremental_ms.c Sat May 16 20:49:38 2009 (r38842)
+++ trunk/src/gc/incremental_ms.c Sat May 16 20:52:24 2009 (r38843)
@@ -771,7 +771,7 @@
ASSERT_ARGS(sweep_cb)
int * const n_obj = (int *)arg;
- Parrot_gc_sweep(interp, pool);
+ Parrot_gc_sweep_pool(interp, pool);
if (interp->profile && (flag & POOL_PMC))
Parrot_gc_profile_end(interp, PARROT_PROF_GC_cp);
@@ -1042,7 +1042,7 @@
if (g_ims->state >= GC_IMS_RE_INIT || g_ims->state < GC_IMS_FINISHED)
Parrot_gc_clear_live_bits(interp, arena_base->pmc_pool);
- Parrot_gc_sweep(interp, interp->arena_base->pmc_pool);
+ Parrot_gc_sweep_pool(interp, interp->arena_base->pmc_pool);
g_ims->state = GC_IMS_DEAD;
return;
Modified: trunk/src/gc/mark_sweep.c
==============================================================================
--- trunk/src/gc/mark_sweep.c Sat May 16 20:49:38 2009 (r38842)
+++ trunk/src/gc/mark_sweep.c Sat May 16 20:52:24 2009 (r38843)
@@ -191,7 +191,7 @@
/*
-=item C<void Parrot_gc_sweep(PARROT_INTERP, Small_Object_Pool *pool)>
+=item C<void Parrot_gc_sweep_pool(PARROT_INTERP, Small_Object_Pool *pool)>
Puts any buffers/PMCs that are now unused onto the pool's free list. If
C<GC_IS_MALLOC>, bufstart gets freed too, if possible. Avoids buffers that
@@ -202,9 +202,9 @@
*/
void
-Parrot_gc_sweep(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool))
+Parrot_gc_sweep_pool(PARROT_INTERP, ARGMOD(Small_Object_Pool *pool))
{
- ASSERT_ARGS(Parrot_gc_sweep)
+ ASSERT_ARGS(Parrot_gc_sweep_pool)
UINTVAL total_used = 0;
const UINTVAL object_size = pool->object_size;
More information about the parrot-commits
mailing list