Skip to content
Snippets Groups Projects
Commit 03f098da authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Might now compiler --without-debug again.

Rev: src/gc.c:1.131
parent 74ba4902
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ struct callback *gc_evaluator_callback=0; ...@@ -30,7 +30,7 @@ struct callback *gc_evaluator_callback=0;
#include "block_alloc.h" #include "block_alloc.h"
RCSID("$Id: gc.c,v 1.130 2000/09/03 23:56:17 mast Exp $"); RCSID("$Id: gc.c,v 1.131 2000/09/04 14:28:08 grubba Exp $");
/* Run garbage collect approximately every time /* Run garbage collect approximately every time
* 20 percent of all arrays, objects and programs is * 20 percent of all arrays, objects and programs is
...@@ -1115,6 +1115,7 @@ int debug_gc_is_referenced(void *a) ...@@ -1115,6 +1115,7 @@ int debug_gc_is_referenced(void *a)
if (Pike_in_gc != GC_PASS_MARK) if (Pike_in_gc != GC_PASS_MARK)
fatal("gc_is_referenced() called in invalid gc pass.\n"); fatal("gc_is_referenced() called in invalid gc pass.\n");
#ifdef PIKE_DEBUG
if (gc_debug) { if (gc_debug) {
m = find_marker(a); m = find_marker(a);
if ((!m || !(m->flags & GC_PRETOUCHED)) && if ((!m || !(m->flags & GC_PRETOUCHED)) &&
...@@ -1122,7 +1123,9 @@ int debug_gc_is_referenced(void *a) ...@@ -1122,7 +1123,9 @@ int debug_gc_is_referenced(void *a)
gc_fatal(a, 0, "Doing gc_is_referenced() on invalid object.\n"); gc_fatal(a, 0, "Doing gc_is_referenced() on invalid object.\n");
if (!m) m = get_marker(a); if (!m) m = get_marker(a);
} }
else m = get_marker(a); else
#endif /* PIKE_DEBUG */
m = get_marker(a);
if (m->flags & GC_IS_REFERENCED) if (m->flags & GC_IS_REFERENCED)
gc_fatal(a, 0, "gc_is_referenced() called twice for thing.\n"); gc_fatal(a, 0, "gc_is_referenced() called twice for thing.\n");
...@@ -2017,7 +2020,9 @@ int do_gc(void) ...@@ -2017,7 +2020,9 @@ int do_gc(void)
run_queue(&gc_mark_queue); run_queue(&gc_mark_queue);
gc_mark_all_objects(); gc_mark_all_objects();
run_queue(&gc_mark_queue); run_queue(&gc_mark_queue);
#ifdef PIKE_DEBUG
if(gc_debug) gc_mark_all_strings(); if(gc_debug) gc_mark_all_strings();
#endif /* PIKE_DEBUG */
GC_VERBOSE_DO(fprintf(stderr, GC_VERBOSE_DO(fprintf(stderr,
"| mark: %u markers referenced,\n" "| mark: %u markers referenced,\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment