Can conservatively preserve only one type of value for debugging.

This commit is contained in:
Alex Shinn 2011-01-10 17:16:11 +09:00
parent a82a13094d
commit e57a587216
2 changed files with 7 additions and 0 deletions

3
gc.c
View file

@ -111,6 +111,9 @@ void sexp_conservative_mark (sexp ctx) {
fprintf(stderr, "GC MISS: %p: %s\n", p, sexp_pointer_source(p));
fflush(stderr);
}
#endif
#if SEXP_USE_CONSERVATIVE_GC_PRESERVE_TAG
if (sexp_pointer_tag(p) == SEXP_USE_CONSERVATIVE_GC_PRESERVE_TAG)
#endif
sexp_mark(ctx, p);
}

View file

@ -309,6 +309,10 @@
#define SEXP_USE_CONSERVATIVE_GC SEXP_USE_DEBUG_GC > 1
#endif
#ifndef SEXP_USE_CONSERVATIVE_GC_PRESERVE_TAG
#define SEXP_USE_CONSERVATIVE_GC_PRESERVE_TAG 0
#endif
#ifndef SEXP_USE_TRACK_ALLOC_SOURCE
#define SEXP_USE_TRACK_ALLOC_SOURCE SEXP_USE_DEBUG_GC > 1
#endif