[svn:parrot] r47203 - branches/gc_massacre/src/gc
bacek at svn.parrot.org
bacek at svn.parrot.org
Mon May 31 10:19:14 UTC 2010
Author: bacek
Date: Mon May 31 10:19:14 2010
New Revision: 47203
URL: https://trac.parrot.org/parrot/changeset/47203
Log:
Made Memory_Pools even more optional during trace_memory_block
Modified:
branches/gc_massacre/src/gc/system.c
Modified: branches/gc_massacre/src/gc/system.c
==============================================================================
--- branches/gc_massacre/src/gc/system.c Mon May 31 10:18:51 2010 (r47202)
+++ branches/gc_massacre/src/gc/system.c Mon May 31 10:19:14 2010 (r47203)
@@ -56,9 +56,8 @@
PARROT_WARN_UNUSED_RESULT
static int is_buffer_ptr(
- ARGIN(const Memory_Pools *mem_pools),
+ ARGIN_NULLOK(const Memory_Pools *mem_pools),
ARGIN(const void *ptr))
- __attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_WARN_UNUSED_RESULT
@@ -75,9 +74,8 @@
__attribute__nonnull__(1);
static void trace_system_stack(PARROT_INTERP,
- ARGIN(const Memory_Pools *mem_pools))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
+ ARGIN_NULLOK(const Memory_Pools *mem_pools))
+ __attribute__nonnull__(1);
#define ASSERT_ARGS_find_common_mask __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
@@ -86,16 +84,14 @@
#define ASSERT_ARGS_get_min_buffer_address __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_get_min_pmc_address __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_is_buffer_ptr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(mem_pools) \
- , PARROT_ASSERT_ARG(ptr))
+ PARROT_ASSERT_ARG(ptr))
#define ASSERT_ARGS_is_pmc_ptr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(mem_pools) \
, PARROT_ASSERT_ARG(ptr))
#define ASSERT_ARGS_trace_mem_block __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_trace_system_stack __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(mem_pools))
+ PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -235,7 +231,7 @@
*/
static void
-trace_system_stack(PARROT_INTERP, ARGIN(const Memory_Pools *mem_pools))
+trace_system_stack(PARROT_INTERP, ARGIN_NULLOK(const Memory_Pools *mem_pools))
{
ASSERT_ARGS(trace_system_stack)
/* Create a local variable on the system stack. This represents the
@@ -496,11 +492,14 @@
PARROT_WARN_UNUSED_RESULT
static int
-is_buffer_ptr(ARGIN(const Memory_Pools *mem_pools), ARGIN(const void *ptr))
+is_buffer_ptr(ARGIN_NULLOK(const Memory_Pools *mem_pools), ARGIN(const void *ptr))
{
ASSERT_ARGS(is_buffer_ptr)
UINTVAL i;
+ if (!mem_pools)
+ return 0;
+
for (i = 0; i < mem_pools->num_sized; ++i) {
if (mem_pools->sized_header_pools[i]
&& contained_in_pool(mem_pools->sized_header_pools[i], ptr))
More information about the parrot-commits
mailing list