X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fpurify.c;h=dc66cd2aa4530df12823a9cb7873036aa3b224e7;hb=94ac5b7c3ff37850210b6fc9a7593cf1c5752993;hp=ba5d88e0977d1e34e6e8a7d365b881495cdc86cd;hpb=6e662062162ad5a6f09d6d3a5ec1249520e813a5;p=sbcl.git diff --git a/src/runtime/purify.c b/src/runtime/purify.c index ba5d88e..dc66cd2 100644 --- a/src/runtime/purify.c +++ b/src/runtime/purify.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "runtime.h" #include "os.h" @@ -97,11 +98,9 @@ static boolean dynamic_pointer_p(lispobj ptr) { #ifndef __i386__ - /* KLUDGE: This has an implicit dependence on the ordering of - * address spaces, and is therefore basically wrong. I'd fix it, - * but I don't have a non-386 port to test it on. Porters are - * encouraged to fix it. -- WHN 2000-10-17 */ - return (ptr >= (lispobj)DYNAMIC_SPACE_START); + return (ptr >= (lispobj)current_dynamic_space + && + ptr < (lispobj)dynamic_space_free_pointer); #else /* Be more conservative, and remember, this is a maybe. */ return (ptr >= (lispobj)DYNAMIC_SPACE_START @@ -181,7 +180,7 @@ valid_dynamic_space_pointer(lispobj *pointer, lispobj *start_addr) return 0; } /* Is it plausible cons? */ - if((is_lisp_pointer(start_addr[0]) + if ((is_lisp_pointer(start_addr[0]) || ((start_addr[0] & 3) == 0) /* fixnum */ || (widetag_of(start_addr[0]) == BASE_CHAR_WIDETAG) || (widetag_of(start_addr[0]) == UNBOUND_MARKER_WIDETAG)) @@ -221,8 +220,8 @@ valid_dynamic_space_pointer(lispobj *pointer, lispobj *start_addr) } return 0; } - /* Is it plausible? Not a cons. X should check the headers. */ - if(is_lisp_pointer(start_addr[0]) || ((start_addr[0] & 3) == 0)) { + /* Is it plausible? Not a cons. XXX should check the headers. */ + if (is_lisp_pointer(start_addr[0]) || ((start_addr[0] & 3) == 0)) { if (pointer_filter_verbose) { fprintf(stderr,"*Wo2: %x %x %x\n", (unsigned int) pointer, (unsigned int) start_addr, *start_addr); @@ -728,7 +727,7 @@ ptrans_code(lispobj thing) /* Arrange to scavenge the debug info later. */ pscav_later(&new->debug_info, 1); - if(new->trace_table_offset & 0x3) + if (new->trace_table_offset & 0x3) #if 0 pscav(&new->trace_table_offset, 1, 0); #else