Changeset 12806
- Timestamp:
- Sep 10, 2009, 8:43:00 AM (15 years ago)
- Location:
- trunk/source/lisp-kernel
- Files:
-
- 2 edited
-
gc-common.c (modified) (6 diffs)
-
memory.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/lisp-kernel/gc-common.c
r11694 r12806 1101 1101 1102 1102 install_weak_mark_functions(lisp_global(WEAK_GC_METHOD) >> fixnumshift); 1103 1104 1105 1103 1106 1104 #ifndef FORCE_DWS_MARK 1107 1105 if ((natural) (tcr->cs_limit) == CS_OVERFLOW_FORCE_LIMIT) { … … 1163 1161 1164 1162 get_time(start); 1163 1164 /* The link-inverting marker might need to write to watched areas */ 1165 unprotect_watched_areas(PROT_READ|PROT_EXEC|PROT_WRITE); 1166 1165 1167 lisp_global(IN_GC) = (1<<fixnumshift); 1166 1168 … … 1238 1240 1239 1241 case AREA_STATIC: 1242 case AREA_WATCHED: 1240 1243 case AREA_DYNAMIC: /* some heap that isn't "the" heap */ 1241 1244 /* In both of these cases, we -could- use the area's "markbits" … … 1373 1376 1374 1377 case AREA_STATIC: 1378 case AREA_WATCHED: 1375 1379 case AREA_DYNAMIC: /* some heap that isn't "the" heap */ 1376 1380 if (next_area->younger == NULL) { … … 1384 1388 } 1385 1389 } 1386 1390 1387 1391 if (GCephemeral_low) { 1388 1392 forward_memoized_area(tenured_area, area_dnode(a->low, tenured_area->low)); … … 1428 1432 1429 1433 lisp_global(IN_GC) = 0; 1434 1435 protect_watched_areas(); 1430 1436 1431 1437 nrs_GC_EVENT_STATUS_BITS.vcell |= gc_postgc_pending; -
trunk/source/lisp-kernel/memory.c
r11986 r12806 948 948 pure_space_active = pure_space_start; 949 949 } 950 951 void 952 protect_watched_areas() 953 { 954 area *a = active_dynamic_area; 955 natural code = a->code; 956 957 while (code != AREA_VOID) { 958 if (code == AREA_WATCHED) { 959 natural size = a->high - a->low; 960 961 ProtectMemory(a->low, size); 962 } 963 a = a->succ; 964 code = a->code; 965 } 966 } 967 968 void 969 unprotect_watched_areas() 970 { 971 area *a = active_dynamic_area; 972 natural code = a->code; 973 974 while (code != AREA_VOID) { 975 if (code == AREA_WATCHED) { 976 natural size = a->high - a->low; 977 978 UnProtectMemory(a->low, size); 979 } 980 a = a->succ; 981 code = a->code; 982 } 983 }
Note:
See TracChangeset
for help on using the changeset viewer.
