[svn:parrot] r47138 - branches/gc_massacre/src/gc
bacek at svn.parrot.org
bacek at svn.parrot.org
Sun May 30 09:37:11 UTC 2010
Author: bacek
Date: Sun May 30 09:37:10 2010
New Revision: 47138
URL: https://trac.parrot.org/parrot/changeset/47138
Log:
Fix rounding up Pool_Allocator_Arena
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 09:31:45 2010 (r47137)
+++ branches/gc_massacre/src/gc/pool_allocator.c Sun May 30 09:37:10 2010 (r47138)
@@ -187,14 +187,13 @@
const size_t num_items = pool->objects_per_alloc;
const size_t item_size = pool->attr_size;
const size_t item_space = item_size * num_items;
- const size_t total_size = sizeof (Pool_Allocator_Arena) + item_space;
+ size_t total_size = sizeof (Pool_Allocator_Arena) + item_space;
/* Round up to 4kb */
- if (total_size < GC_FIXED_SIZE_POOL_SIZE)
- total_size = GC_FIXED_SIZE_POOL_SIZE;
-
Pool_Allocator_Arena * const new_arena = (Pool_Allocator_Arena *)mem_internal_allocate(
- total_size);
+ total_size < GC_FIXED_SIZE_POOL_SIZE
+ ? GC_FIXED_SIZE_POOL_SIZE
+ : total_size);
new_arena->prev = NULL;
new_arena->next = pool->top_arena;
More information about the parrot-commits
mailing list