Mercurial > hg > xemacs-beta
comparison src/extents.c @ 3263:d674024a8674
[xemacs-hg @ 2006-02-27 16:29:00 by crestani]
- Introduce a fancy asynchronous finalization strategy on C level.
- Merge the code conditioned on MC_ALLOC into the code conditioned on
NEW_GC.
- Remove the possibility to free objects manually outside garbage
collections when the new collector is enabled.
author | crestani |
---|---|
date | Mon, 27 Feb 2006 16:29:29 +0000 |
parents | 2b8bb4938bb4 |
children | 4d52aea479a2 |
comparison
equal
deleted
inserted
replaced
3262:79d41cfd8e6b | 3263:d674024a8674 |
---|---|
1267 } | 1267 } |
1268 | 1268 |
1269 return Qnil; | 1269 return Qnil; |
1270 } | 1270 } |
1271 | 1271 |
1272 #ifdef NEW_GC | |
1273 DEFINE_LRECORD_IMPLEMENTATION ("extent-info", extent_info, | |
1274 0, /*dumpable-flag*/ | |
1275 mark_extent_info, internal_object_printer, | |
1276 0, 0, 0, | |
1277 extent_info_description, | |
1278 struct extent_info); | |
1279 #else /* not NEW_GC */ | |
1272 static void | 1280 static void |
1273 finalize_extent_info (void *header, int for_disksave) | 1281 finalize_extent_info (void *header, int for_disksave) |
1274 { | 1282 { |
1275 struct extent_info *data = (struct extent_info *) header; | 1283 struct extent_info *data = (struct extent_info *) header; |
1276 | 1284 |
1277 if (for_disksave) | 1285 if (for_disksave) |
1278 return; | 1286 return; |
1279 | 1287 |
1280 #ifdef NEW_GC | |
1281 data->soe = 0; | 1288 data->soe = 0; |
1282 data->extents = 0; | 1289 data->extents = 0; |
1283 #else /* not NEW_GC */ | |
1284 if (data->soe) | 1290 if (data->soe) |
1285 { | 1291 { |
1286 free_soe (data->soe); | 1292 free_soe (data->soe); |
1287 data->soe = 0; | 1293 data->soe = 0; |
1288 } | 1294 } |
1289 if (data->extents) | 1295 if (data->extents) |
1290 { | 1296 { |
1291 free_extent_list (data->extents); | 1297 free_extent_list (data->extents); |
1292 data->extents = 0; | 1298 data->extents = 0; |
1293 } | 1299 } |
1294 #endif /* not NEW_GC */ | |
1295 } | 1300 } |
1296 | 1301 |
1297 DEFINE_LRECORD_IMPLEMENTATION ("extent-info", extent_info, | 1302 DEFINE_LRECORD_IMPLEMENTATION ("extent-info", extent_info, |
1298 0, /*dumpable-flag*/ | 1303 0, /*dumpable-flag*/ |
1299 mark_extent_info, internal_object_printer, | 1304 mark_extent_info, internal_object_printer, |
1300 finalize_extent_info, 0, 0, | 1305 finalize_extent_info, 0, 0, |
1301 extent_info_description, | 1306 extent_info_description, |
1302 struct extent_info); | 1307 struct extent_info); |
1308 #endif /* not NEW_GC */ | |
1303 | 1309 |
1304 static Lisp_Object | 1310 static Lisp_Object |
1305 allocate_extent_info (void) | 1311 allocate_extent_info (void) |
1306 { | 1312 { |
1307 Lisp_Object extent_info; | 1313 Lisp_Object extent_info; |
7456 INIT_LRECORD_IMPLEMENTATION (gap_array_marker); | 7462 INIT_LRECORD_IMPLEMENTATION (gap_array_marker); |
7457 INIT_LRECORD_IMPLEMENTATION (gap_array); | 7463 INIT_LRECORD_IMPLEMENTATION (gap_array); |
7458 INIT_LRECORD_IMPLEMENTATION (extent_list_marker); | 7464 INIT_LRECORD_IMPLEMENTATION (extent_list_marker); |
7459 INIT_LRECORD_IMPLEMENTATION (extent_list); | 7465 INIT_LRECORD_IMPLEMENTATION (extent_list); |
7460 INIT_LRECORD_IMPLEMENTATION (stack_of_extents); | 7466 INIT_LRECORD_IMPLEMENTATION (stack_of_extents); |
7461 #endif /* not NEW_GC */ | 7467 #endif /* NEW_GC */ |
7462 | 7468 |
7463 DEFSYMBOL (Qextentp); | 7469 DEFSYMBOL (Qextentp); |
7464 DEFSYMBOL (Qextent_live_p); | 7470 DEFSYMBOL (Qextent_live_p); |
7465 | 7471 |
7466 DEFSYMBOL (Qall_extents_closed); | 7472 DEFSYMBOL (Qall_extents_closed); |