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

mikehh at svn.parrot.org mikehh at svn.parrot.org
Tue Jun 8 12:40:51 UTC 2010


Author: mikehh
Date: Tue Jun  8 12:40:50 2010
New Revision: 47468
URL: https://trac.parrot.org/parrot/changeset/47468

Log:
add ASSERT_ARGS and fix line length

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	Tue Jun  8 12:21:41 2010	(r47467)
+++ branches/gc_massacre/src/gc/fixed_allocator.c	Tue Jun  8 12:40:50 2010	(r47468)
@@ -57,6 +57,8 @@
 struct Fixed_Allocator*
 Parrot_gc_fixed_allocator_new(PARROT_INTERP)
 {
+    ASSERT_ARGS(Parrot_gc_fixed_allocator_new)
+
     return mem_internal_allocate_zeroed_typed(Fixed_Allocator);
 }
 
@@ -64,6 +66,8 @@
 void
 Parrot_gc_fixed_allocator_destroy(PARROT_INTERP, ARGFREE_NOTNULL(Fixed_Allocator *allocator))
 {
+    ASSERT_ARGS(Parrot_gc_fixed_allocator_destroy)
+
 }
 
 PARROT_EXPORT
@@ -73,6 +77,8 @@
         ARGIN(Fixed_Allocator *allocator),
         size_t size)
 {
+    ASSERT_ARGS(Parrot_gc_fixed_allocator_allocate)
+
     /* We always align size to 4/8 bytes. */
     size_t  index, alloc_size;
     void   *ret;
@@ -84,7 +90,8 @@
         size_t new_size = index + 1;
         /* (re)allocate pools */
         if (allocator->num_pools)
-            allocator->pools = mem_internal_realloc_n_zeroed_typed(allocator->pools, new_size, allocator->num_pools, Pool_Allocator*);
+            allocator->pools = mem_internal_realloc_n_zeroed_typed(
+                                allocator->pools, new_size, allocator->num_pools, Pool_Allocator*);
         else
             allocator->pools = mem_internal_allocate_n_zeroed_typed(new_size, Pool_Allocator*);
 
@@ -105,6 +112,8 @@
         ARGIN(Fixed_Allocator *allocator),
         ARGFREE_NOTNULL(void *data), size_t size)
 {
+    ASSERT_ARGS(Parrot_gc_fixed_allocator_free)
+
     /* We always align size to 4/8 bytes. */
     size_t index = (size - 1) / sizeof (void*);
 


More information about the parrot-commits mailing list