X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fcheneygc.c;h=23b62d72c40c287e8f623fa2b3fdd3b3e5540237;hb=dde834ef75cb12b8cdda23472b3365de72d9422a;hp=53930cf47734455f68e4ea72ff72bbb7177e31a1;hpb=0e2c926fea68a32c8ec58f12daa0c2b5befef1d4;p=sbcl.git diff --git a/src/runtime/cheneygc.c b/src/runtime/cheneygc.c index 53930cf..23b62d7 100644 --- a/src/runtime/cheneygc.c +++ b/src/runtime/cheneygc.c @@ -136,6 +136,8 @@ collect_garbage(unsigned ignore) gettimeofday(&start_tv, (struct timezone *) 0); #endif + /* it's possible that signals are blocked already if this was called + * from a signal handler (e.g. with the sigsegv gc_trigger stuff) */ sigemptyset(&tmp); sigaddset_blockable(&tmp); sigprocmask(SIG_BLOCK, &tmp, &old); @@ -567,7 +569,42 @@ scav_weak_pointer(lispobj *where, lispobj object) return WEAK_POINTER_NWORDS; } + +lispobj * +search_read_only_space(void *pointer) +{ + lispobj* start = (lispobj*)READ_ONLY_SPACE_START; + lispobj* end = (lispobj*)SymbolValue(READ_ONLY_SPACE_FREE_POINTER,0); + if ((pointer < (void *)start) || (pointer >= (void *)end)) + return NULL; + return (search_space(start, + (((lispobj *)pointer)+2)-start, + (lispobj *)pointer)); +} + +lispobj * +search_static_space(void *pointer) +{ + lispobj* start = (lispobj*)STATIC_SPACE_START; + lispobj* end = (lispobj*)SymbolValue(STATIC_SPACE_FREE_POINTER,0); + if ((pointer < (void *)start) || (pointer >= (void *)end)) + return NULL; + return (search_space(start, + (((lispobj *)pointer)+2)-start, + (lispobj *)pointer)); +} +lispobj * +search_dynamic_space(void *pointer) +{ + lispobj *start = (lispobj *) current_dynamic_space; + lispobj *end = (lispobj *) dynamic_space_free_pointer; + if ((pointer < (void *)start) || (pointer >= (void *)end)) + return NULL; + return (search_space(start, + (((lispobj *)pointer)+2)-start, + (lispobj *)pointer)); +} /* initialization. if gc_init can be moved to after core load, we could * combine these two functions */