X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fgc-internal.h;h=c1e08346494437d48e8d3f7ee79c2cf0e0669ff5;hb=d25e3478acccec70402ff32554669a982be8e281;hp=56dfcfae0a6f7edbf2f395645fb73e32c457cb22;hpb=fee931bde89778322557461356580752bc819cbf;p=sbcl.git diff --git a/src/runtime/gc-internal.h b/src/runtime/gc-internal.h index 56dfcfa..c1e0834 100644 --- a/src/runtime/gc-internal.h +++ b/src/runtime/gc-internal.h @@ -19,7 +19,11 @@ #include /* disabling gc assertions made no discernable difference to GC speed, - * last I tried it - dan 2003.12.21 */ + * last I tried it - dan 2003.12.21 + * + * And it's unsafe to do so while things like gc_assert(0 == + * thread_mutex_lock(&allocation_lock)) exist. - MG 2009-01-13 + */ #if 1 # define gc_assert(ex) \ do { \ @@ -72,6 +76,7 @@ NWORDS(unsigned long x, unsigned long n_bits) #define BOXED_PAGE_FLAG 1 #define UNBOXED_PAGE_FLAG 2 #define OPEN_REGION_PAGE_FLAG 4 +#define CODE_PAGE_FLAG (BOXED_PAGE_FLAG|UNBOXED_PAGE_FLAG) #define ALLOC_BOXED 0 #define ALLOC_UNBOXED 1 @@ -88,7 +93,7 @@ gc_general_alloc(long nbytes, int page_type_flag, int quick_p) struct alloc_region *my_region; if (UNBOXED_PAGE_FLAG == page_type_flag) { my_region = &unboxed_region; - } else if (BOXED_PAGE_FLAG == page_type_flag) { + } else if (BOXED_PAGE_FLAG & page_type_flag) { my_region = &boxed_region; } else { lose("bad page type flag: %d", page_type_flag); @@ -96,7 +101,7 @@ gc_general_alloc(long nbytes, int page_type_flag, int quick_p) return gc_alloc_with_region(nbytes, page_type_flag, my_region, quick_p); } #else -void *gc_general_alloc(long nbytes,int page_type_flag,int quick_p); +extern void *gc_general_alloc(long nbytes,int page_type_flag,int quick_p); #endif extern long (*scavtab[256])(lispobj *where, lispobj object); @@ -116,6 +121,7 @@ lispobj copy_large_unboxed_object(lispobj object, long nwords); lispobj copy_unboxed_object(lispobj object, long nwords); lispobj copy_large_object(lispobj object, long nwords); lispobj copy_object(lispobj object, long nwords); +lispobj copy_code_object(lispobj object, long nwords); lispobj *search_read_only_space(void *pointer); lispobj *search_static_space(void *pointer);