[svn:parrot] r49182 - branches/gc_massacre/src/gc

chromatic at svn.parrot.org chromatic at svn.parrot.org
Mon Sep 20 20:14:08 UTC 2010


Author: chromatic
Date: Mon Sep 20 20:14:08 2010
New Revision: 49182
URL: https://trac.parrot.org/parrot/changeset/49182

Log:
[GC] Improved consting in arena_size().

This has little effect on performance, but why not?  (Unless C++ compilers
can't handle it, in which case quiet sobbing is appropriate.)

Modified:
   branches/gc_massacre/src/gc/fixed_allocator.c

Modified: branches/gc_massacre/src/gc/fixed_allocator.c
==============================================================================
--- branches/gc_massacre/src/gc/fixed_allocator.c	Mon Sep 20 20:14:05 2010	(r49181)
+++ branches/gc_massacre/src/gc/fixed_allocator.c	Mon Sep 20 20:14:08 2010	(r49182)
@@ -393,6 +393,7 @@
 =cut
 
 */
+
 static size_t
 arena_size(ARGIN(const Pool_Allocator *self))
 {
@@ -401,7 +402,7 @@
     const size_t num_items  = self->objects_per_alloc;
     const size_t item_size  = self->object_size;
     const size_t item_space = item_size * num_items;
-    size_t total_size = sizeof (Pool_Allocator_Arena) + item_space;
+    const size_t total_size = sizeof (Pool_Allocator_Arena) + item_space;
 
     /* Round up to 4kb */
     return total_size < GC_FIXED_SIZE_POOL_SIZE


More information about the parrot-commits mailing list