2 * This software is part of the SBCL system. See the README file for
5 * This software is derived from the CMU CL system, which was
6 * written at Carnegie Mellon University and released into the
7 * public domain. The software is in the public domain and is
8 * provided with absolutely no warranty. See the COPYING and CREDITS
9 * files for more information.
12 #include "os.h" /* for os_context_t */
14 extern lispobj *from_space;
15 extern lispobj *from_space_free_pointer;
17 extern lispobj *new_space;
18 extern lispobj *new_space_free_pointer;
22 /* #if defined(DEBUG_SPACE_PREDICATES) */
25 from_space_p(lispobj object)
29 /* this can be called for untagged pointers as well as for
30 descriptors, so this assertion's not applicable
31 gc_assert(is_lisp_pointer(object));
33 ptr = (lispobj *) native_pointer(object);
35 return ((from_space <= ptr) &&
36 (ptr < from_space_free_pointer));
40 new_space_p(lispobj object)
44 /* gc_assert(is_lisp_pointer(object)); */
46 ptr = (lispobj *) native_pointer(object);
48 return ((new_space <= ptr) &&
49 (ptr < new_space_free_pointer));
54 #define from_space_p(ptr) \
55 ((from_space <= ((lispobj *) ((pointer_sized_uint_t) ptr))) && \
56 (((lispobj *) ((pointer_sized_uint_t) ptr))< from_space_free_pointer))
58 #define new_space_p(ptr) \
59 ((new_space <= ((lispobj *) ((pointer_sized_uint_t) ptr))) && \
60 (((lispobj *) ((pointer_sized_uint_t) ptr)) < new_space_free_pointer))
64 extern boolean cheneygc_handle_wp_violation(os_context_t*, void*);