Don't include gc_poison_region in non-debug builds.

This commit is contained in:
Jesse D. McDonald 2010-04-08 18:17:23 -05:00
parent 12b5976b66
commit 311a4c2d55
1 changed files with 2 additions and 0 deletions

2
gc.c
View File

@ -411,6 +411,7 @@ void clear_gc_stats(void)
gc_stats.max_ns = 0; gc_stats.max_ns = 0;
} }
#ifndef NDEBUG
static void gc_poison_region(void *start, size_t size, value_t tag) static void gc_poison_region(void *start, size_t size, value_t tag)
{ {
size_t count = size / GC_ALIGNMENT; size_t count = size / GC_ALIGNMENT;
@ -419,6 +420,7 @@ static void gc_poison_region(void *start, size_t size, value_t tag)
while (count--) while (count--)
*obj++ = (object_t){ .tag = tag, .forward = tag }; *obj++ = (object_t){ .tag = tag, .forward = tag };
} }
#endif
/****************************** Gen-0 Collector *****************************/ /****************************** Gen-0 Collector *****************************/