X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fcheneygc.c;h=4948da85d0e69a469da9deb6e0e42bec2bad62de;hb=eaa8a506790bb6ed627da617247bfd13802eb365;hp=fc003f53de757e5a8acd49fc7087bdb9f1c7d516;hpb=f78c1fecf191e147ca081026cc11f2683ee80905;p=sbcl.git diff --git a/src/runtime/cheneygc.c b/src/runtime/cheneygc.c index fc003f5..4948da8 100644 --- a/src/runtime/cheneygc.c +++ b/src/runtime/cheneygc.c @@ -237,7 +237,10 @@ collect_garbage(unsigned ignore) printf("Flipping spaces ...\n"); #endif - os_zero((os_vm_address_t) current_dynamic_space, + /* Maybe FIXME: it's possible that we could significantly reduce + * 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); current_dynamic_space = new_space; @@ -248,6 +251,8 @@ collect_garbage(unsigned ignore) #endif size_retained = (new_space_free_pointer - new_space) * sizeof(lispobj); + os_flush_icache((os_vm_address_t)new_space, size_retained); + /* Zero stack. */ #ifdef PRINTNOISE printf("Zeroing empty part of control stack ...\n"); @@ -280,10 +285,6 @@ collect_garbage(unsigned ignore) printf("%10.2f M bytes/sec collected.\n", gc_rate); #endif - /* os_flush_icache((os_vm_address_t) 0, sizeof(unsigned long)); */ - /* Maybe FIXME: it's possible that we could significantly reduce - * RSS by zeroing the from_space or madvise(MADV_DONTNEED) or - * similar os-dependent tricks here */ } @@ -419,8 +420,6 @@ void scavenge_interrupt_contexts(void) os_context_t *context; struct thread *th=arch_os_get_current_thread(); - struct interrupt_data *data= - th ? th->interrupt_data : global_interrupt_data; index = fixnum_value(SymbolValue(FREE_INTERRUPT_CONTEXT_INDEX,0)); @@ -531,9 +530,9 @@ search_read_only_space(void *pointer) 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)); + return (gc_search_space(start, + (((lispobj *)pointer)+2)-start, + (lispobj *)pointer)); } lispobj * @@ -543,9 +542,9 @@ search_static_space(void *pointer) 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)); + return (gc_search_space(start, + (((lispobj *)pointer)+2)-start, + (lispobj *)pointer)); } lispobj * @@ -555,9 +554,9 @@ search_dynamic_space(void *pointer) 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)); + return (gc_search_space(start, + (((lispobj *)pointer)+2)-start, + (lispobj *)pointer)); } /* initialization. if gc_init can be moved to after core load, we could