Changeset 8475
- Timestamp:
- Feb 12, 2008, 7:02:15 AM (17 years ago)
- Location:
- trunk/source/lisp-kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/lisp-kernel/memory.c
r8408 r8475 616 616 } 617 617 618 void 619 release_readonly_area() 620 { 621 area *a = readonly_area; 622 munmap(a->low,align_to_power_of_2(a->active-a->low, log2_page_size)); 623 a->active = a->low; 624 a->ndnodes = 0; 625 pure_space_active = pure_space_start; 626 } -
trunk/source/lisp-kernel/x86-exceptions.c
r8471 r8475 157 157 area *a = active_dynamic_area; 158 158 Boolean egc_was_enabled = (a->older != NULL); 159 159 160 natural gc_previously_deferred = gc_deferred; 160 161 … … 219 220 full_gc_deferred = 0; 220 221 } 221 if (selector & GC_TRAP_FUNCTION_PURIFY) { 222 purify_from_xp(xp, 0L); 223 gc_from_xp(xp, 0L); 224 } 225 if (selector & GC_TRAP_FUNCTION_SAVE_APPLICATION) { 226 OSErr err; 227 extern OSErr save_application(unsigned); 228 area *vsarea = tcr->vs_area; 222 if (selector > GC_TRAP_FUNCTION_GC) { 223 if (selector & GC_TRAP_FUNCTION_IMPURIFY) { 224 impurify_from_xp(xp, 0L); 225 /* nrs_GC_EVENT_STATUS_BITS.vcell |= gc_integrity_check_bit; */ 226 gc_from_xp(xp, 0L); 227 release_readonly_area(); 228 } 229 if (selector & GC_TRAP_FUNCTION_PURIFY) { 230 purify_from_xp(xp, 0L); 231 gc_from_xp(xp, 0L); 232 } 233 if (selector & GC_TRAP_FUNCTION_SAVE_APPLICATION) { 234 OSErr err; 235 extern OSErr save_application(unsigned); 236 area *vsarea = tcr->vs_area; 229 237 230 nrs_TOPLFUNC.vcell = *((LispObj *)(vsarea->high)-1); 231 err = save_application(arg); 232 if (err == noErr) { 233 _exit(0); 238 nrs_TOPLFUNC.vcell = *((LispObj *)(vsarea->high)-1); 239 err = save_application(arg); 240 if (err == noErr) { 241 _exit(0); 242 } 243 fatal_oserr(": save_application", err); 234 244 } 235 fatal_oserr(": save_application", err); 236 } 237 switch (selector) { 238 case GC_TRAP_FUNCTION_SET_HONS_AREA_SIZE: 239 xpGPR(xp, Iimm0) = 0; 240 break; 241 case GC_TRAP_FUNCTION_FREEZE: 242 a->active = (BytePtr) align_to_power_of_2(a->active, log2_page_size); 243 tenured_area->static_dnodes = area_dnode(a->active, a->low); 244 xpGPR(xp, Iimm0) = tenured_area->static_dnodes << dnode_shift; 245 break; 246 default: 247 break; 245 switch (selector) { 246 case GC_TRAP_FUNCTION_SET_HONS_AREA_SIZE: 247 xpGPR(xp, Iimm0) = 0; 248 break; 249 case GC_TRAP_FUNCTION_FREEZE: 250 a->active = (BytePtr) align_to_power_of_2(a->active, log2_page_size); 251 tenured_area->static_dnodes = area_dnode(a->active, a->low); 252 xpGPR(xp, Iimm0) = tenured_area->static_dnodes << dnode_shift; 253 break; 254 default: 255 break; 256 } 248 257 } 249 258 if (egc_was_enabled) { -
trunk/source/lisp-kernel/x86-gc.c
r8472 r8475 1782 1782 } 1783 1783 } 1784 1784 1785 void 1785 1786 purify_headerless_range(LispObj *start, LispObj *end, BytePtr low, BytePtr high, area *to) … … 2058 2059 2059 2060 2060 2061 void 2062 impurify_xp(ExceptionInformation *xp, LispObj low, LispObj high, int delta) 2061 void 2062 impurify_gcable_ptrs(LispObj low, LispObj high, signed_natural delta) 2063 { 2064 LispObj *prev = &(lisp_global(GCABLE_POINTERS)), next; 2065 2066 while ((*prev) != (LispObj)NULL) { 2067 impurify_noderef(prev, low, high, delta); 2068 next = *prev; 2069 prev = &(((xmacptr *)ptr_from_lispobj(untag(next)))->link); 2070 } 2071 } 2072 2073 2074 void 2075 impurify_xp(ExceptionInformation *xp, LispObj low, LispObj high, signed_natural delta) 2063 2076 { 2064 2077 natural *regs = (natural *) xpGPRvector(xp); … … 2085 2098 2086 2099 void 2087 impurify_headerless_range(LispObj *start, LispObj *end, LispObj low, LispObj high, intdelta)2100 impurify_headerless_range(LispObj *start, LispObj *end, LispObj low, LispObj high, signed_natural delta) 2088 2101 { 2089 2102 while (start < end) { … … 2095 2108 2096 2109 void 2097 impurify_range(LispObj *start, LispObj *end, LispObj low, LispObj high, intdelta)2110 impurify_range(LispObj *start, LispObj *end, LispObj low, LispObj high, signed_natural delta) 2098 2111 { 2099 2112 LispObj header; … … 2167 2180 2168 2181 void 2169 impurify_tcr_tlb(TCR *tcr, LispObj low, LispObj high, intdelta)2182 impurify_tcr_tlb(TCR *tcr, LispObj low, LispObj high, signed_natural delta) 2170 2183 { 2171 2184 unsigned n = tcr->tlb_limit; … … 2176 2189 2177 2190 void 2178 impurify_tcr_xframes(TCR *tcr, LispObj low, LispObj high, intdelta)2191 impurify_tcr_xframes(TCR *tcr, LispObj low, LispObj high, signed_natural delta) 2179 2192 { 2180 2193 xframe_list *xframes; … … 2192 2205 2193 2206 void 2194 impurify_tstack_area(area *a, LispObj low, LispObj high, intdelta)2207 impurify_tstack_area(area *a, LispObj low, LispObj high, signed_natural delta) 2195 2208 { 2196 2209 LispObj … … 2212 2225 } 2213 2226 void 2214 impurify_vstack_area(area *a, LispObj low, LispObj high, intdelta)2227 impurify_vstack_area(area *a, LispObj low, LispObj high, signed_natural delta) 2215 2228 { 2216 2229 LispObj … … 2223 2236 2224 2237 void 2225 impurify_areas(LispObj low, LispObj high, intdelta)2238 impurify_areas(LispObj low, LispObj high, signed_natural delta) 2226 2239 { 2227 2240 area *next_area; … … 2239 2252 2240 2253 case AREA_CSTACK: 2241 #ifdef PPC2242 impurify_cstack_area(next_area, low, high, delta);2243 #endif2244 2254 break; 2245 2255 … … 2265 2275 oldhigh = a->high, newhigh; 2266 2276 unsigned n = ro_limit - ro_base; 2267 intdelta = oldfree-ro_base;2277 signed_natural delta = oldfree-ro_base; 2268 2278 TCR *other_tcr; 2269 2279 … … 2290 2300 other_tcr = other_tcr->next; 2291 2301 } while (other_tcr != tcr); 2302 2303 impurify_gcable_ptrs(ptr_to_lispobj(ro_base), ptr_to_lispobj(ro_limit), delta); 2292 2304 lisp_global(IN_GC) = 0; 2293 2305 }
Note:
See TracChangeset
for help on using the changeset viewer.
