X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fcheneygc.c;h=0f7d38b75b011d793e8e205dd23b7977bf877ab5;hb=f7aa9f04c9d2124f094f4b9e857e8ce3b92035e4;hp=a18d878164727c64f409d2e26f50e4b3e1c1de66;hpb=79cc569a97e444389350ea3f5b1017374fe16bec;p=sbcl.git diff --git a/src/runtime/cheneygc.c b/src/runtime/cheneygc.c index a18d878..0f7d38b 100644 --- a/src/runtime/cheneygc.c +++ b/src/runtime/cheneygc.c @@ -47,8 +47,6 @@ lispobj *new_space; lispobj *new_space_free_pointer; static void scavenge_newspace(void); -static void scavenge_interrupt_contexts(void); -extern struct interrupt_data * global_interrupt_data; extern unsigned long bytes_consed_between_gcs; @@ -110,7 +108,7 @@ lispobj copy_large_object(lispobj object, long nwords) { * last_generation argument. That's meaningless for us, since we're * not a generational GC. So we ignore it. */ void -collect_garbage(unsigned ignore) +collect_garbage(generation_index_t ignore) { #ifdef PRINTNOISE struct timeval start_tv, stop_tv; @@ -125,9 +123,6 @@ collect_garbage(unsigned ignore) unsigned long control_stack_size, binding_stack_size; sigset_t tmp, old; struct thread *th=arch_os_get_current_thread(); - struct interrupt_data *data= - th ? th->interrupt_data : global_interrupt_data; - #ifdef PRINTNOISE printf("[Collecting garbage ... \n"); @@ -179,8 +174,8 @@ collect_garbage(unsigned ignore) printf("Scavenging interrupt handlers (%d bytes) ...\n", (int)sizeof(interrupt_handlers)); #endif - scavenge((lispobj *) data->interrupt_handlers, - sizeof(data->interrupt_handlers) / sizeof(lispobj)); + scavenge((lispobj *) interrupt_handlers, + sizeof(interrupt_handlers) / sizeof(lispobj)); /* _size quantities are in units of sizeof(lispobj) - i.e. 4 */ control_stack_size = @@ -227,11 +222,16 @@ collect_garbage(unsigned ignore) /* Scan the weak pointers. */ #ifdef PRINTNOISE + printf("Scanning weak hash tables ...\n"); +#endif + scan_weak_hash_tables(); + + /* Scan the weak pointers. */ +#ifdef PRINTNOISE printf("Scanning weak pointers ...\n"); #endif scan_weak_pointers(); - /* Flip spaces. */ #ifdef PRINTNOISE printf("Flipping spaces ...\n"); @@ -241,7 +241,7 @@ collect_garbage(unsigned ignore) * RSS by zeroing the from_space or madvise(MADV_DONTNEED) or * similar os-dependent tricks here */ os_zero((os_vm_address_t) from_space, - (os_vm_size_t) DYNAMIC_SPACE_SIZE); + (os_vm_size_t) dynamic_space_size); current_dynamic_space = new_space; dynamic_space_free_pointer = new_space_free_pointer; @@ -301,6 +301,7 @@ scavenge_newspace(void) here,new_space_free_pointer); */ next = new_space_free_pointer; scavenge(here, next - here); + scav_weak_hash_tables(); here = next; } /* printf("done with newspace\n"); */ @@ -494,20 +495,6 @@ print_garbage(lispobj *from_space, lispobj *from_space_free_pointer) } -/* vector-like objects */ - -static long -scav_vector(lispobj *where, lispobj object) -{ - if (HeaderValue(object) == subtype_VectorValidHashing) { - *where = - (subtype_VectorMustRehash<