[svn:parrot] r47144 - branches/gc_massacre/src/gc
bacek at svn.parrot.org
bacek at svn.parrot.org
Sun May 30 11:19:41 UTC 2010
Author: bacek
Date: Sun May 30 11:19:41 2010
New Revision: 47144
URL: https://trac.parrot.org/parrot/changeset/47144
Log:
Implement destruction of Pool_Allocator.
Modified:
branches/gc_massacre/src/gc/pool_allocator.c
Modified: branches/gc_massacre/src/gc/pool_allocator.c
==============================================================================
--- branches/gc_massacre/src/gc/pool_allocator.c Sun May 30 11:17:10 2010 (r47143)
+++ branches/gc_massacre/src/gc/pool_allocator.c Sun May 30 11:19:41 2010 (r47144)
@@ -94,7 +94,15 @@
void
Parrot_gc_destroy_pool_alloctor(PARROT_INTERP, ARGMOD(Pool_Allocator *pool))
{
- // TODO
+ Pool_Allocator_Arena *arena = pool->top_arena;
+
+ while (arena) {
+ Pool_Allocator_Arena *next = arena->next;
+ mem_internal_free(arena);
+ arena = next;
+ }
+
+ mem_internal_free(pool);
}
More information about the parrot-commits
mailing list