summaryrefslogtreecommitdiffstats
path: root/gc.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-08-19 07:16:50 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-08-19 07:16:50 -0700
commitf057826476218f1c277e6f14870b8f85184e1e38 (patch)
tree165d140358ec91bc9dc1b50714794b484baf1b40 /gc.h
parent36a61da3883e8baca45a80c703211ae71be4c6ff (diff)
downloadtxr-f057826476218f1c277e6f14870b8f85184e1e38.tar.gz
txr-f057826476218f1c277e6f14870b8f85184e1e38.tar.bz2
txr-f057826476218f1c277e6f14870b8f85184e1e38.zip
Provide conservative marking interface.
GC now exports a function for marking something that might not be an object, instead of a function for testing. The previous way wasn't integrated with Valgrind properly, and didn't observe the FREE flag. * gc.c (gc_is_heap_obj): Function removed. (mark_obj_maybe): New static function, with body consisting of code moved from mark_mem_region. (mark_mem_region): Moved code replaced by call to mark_obj_maybe. (gc_conservative_mark): New function, wraps mark_obj_maybe. * gc.h (gc_conservative_mark): Declared. (gc_is_heap_obj): Declaration removed. * parser.c (yy_tok_mark): Use gc_conservative_mark instead of gc_is_heap_obj check and gc_mark.
Diffstat (limited to 'gc.h')
-rw-r--r--gc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.h b/gc.h
index b24b470e..255171f5 100644
--- a/gc.h
+++ b/gc.h
@@ -33,8 +33,8 @@ val make_obj(void);
void gc(void);
int gc_state(int);
void gc_mark(val);
+void gc_conservative_mark(val);
int gc_is_reachable(val);
-int gc_is_heap_obj(union obj *ptr);
#if CONFIG_GEN_GC
val gc_set(loc, val);