Mercurial > hg > xemacs-beta
comparison src/emacs.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 | 15139dbf89f4 |
children | 15fb91e3a115 |
comparison
equal
deleted
inserted
replaced
3262:79d41cfd8e6b | 3263:d674024a8674 |
---|---|
912 | 912 |
913 noninteractive = 0; | 913 noninteractive = 0; |
914 display_use = 0; | 914 display_use = 0; |
915 inhibit_non_essential_conversion_operations = 1; | 915 inhibit_non_essential_conversion_operations = 1; |
916 | 916 |
917 #ifdef MC_ALLOC | 917 #ifdef NEW_GC |
918 #ifndef PDUMP | 918 #ifndef PDUMP |
919 if (!initialized) | 919 if (!initialized) |
920 #endif | 920 #endif |
921 { | 921 { |
922 if (!restart) | 922 if (!restart) |
925 #ifdef ALLOC_TYPE_STATS | 925 #ifdef ALLOC_TYPE_STATS |
926 init_lrecord_stats (); | 926 init_lrecord_stats (); |
927 #endif /* ALLOC_TYPE_STATS */ | 927 #endif /* ALLOC_TYPE_STATS */ |
928 } | 928 } |
929 } | 929 } |
930 #endif /* MC_ALLOC */ | 930 #endif /* NEW_GC */ |
931 | 931 |
932 #ifdef NeXT | 932 #ifdef NeXT |
933 /* 19-Jun-1995 -baw | 933 /* 19-Jun-1995 -baw |
934 * NeXT secret magic, ripped from Emacs-for-NS by Carl Edman | 934 * NeXT secret magic, ripped from Emacs-for-NS by Carl Edman |
935 * <cedman@princeton.edu>. Note that even Carl doesn't know what this | 935 * <cedman@princeton.edu>. Note that even Carl doesn't know what this |
1318 the Lisp engine and need to be done both at dump time and at run time. */ | 1318 the Lisp engine and need to be done both at dump time and at run time. */ |
1319 | 1319 |
1320 init_signals_very_early (); | 1320 init_signals_very_early (); |
1321 #ifdef NEW_GC | 1321 #ifdef NEW_GC |
1322 vdb_install_signal_handler (); | 1322 vdb_install_signal_handler (); |
1323 #endif | 1323 #endif /* NEW_GC */ |
1324 init_data_very_early (); /* Catch math errors. */ | 1324 init_data_very_early (); /* Catch math errors. */ |
1325 init_floatfns_very_early (); /* Catch floating-point math errors. */ | 1325 init_floatfns_very_early (); /* Catch floating-point math errors. */ |
1326 init_process_times_very_early (); /* Initialize our process timers. | 1326 init_process_times_very_early (); /* Initialize our process timers. |
1327 As early as possible, of course, | 1327 As early as possible, of course, |
1328 so we can be fairly accurate. */ | 1328 so we can be fairly accurate. */ |
1452 Order does not matter in these functions. | 1452 Order does not matter in these functions. |
1453 */ | 1453 */ |
1454 | 1454 |
1455 syms_of_abbrev (); | 1455 syms_of_abbrev (); |
1456 syms_of_alloc (); | 1456 syms_of_alloc (); |
1457 #ifdef MC_ALLOC | 1457 #ifdef NEW_GC |
1458 syms_of_mc_alloc (); | 1458 syms_of_mc_alloc (); |
1459 #endif /* MC_ALLOC */ | 1459 #endif /* NEW_GC */ |
1460 syms_of_gc (); | 1460 syms_of_gc (); |
1461 #ifdef NEW_GC | 1461 #ifdef NEW_GC |
1462 syms_of_vdb (); | 1462 syms_of_vdb (); |
1463 #endif /* NEW_GC */ | 1463 #endif /* NEW_GC */ |
1464 syms_of_buffer (); | 1464 syms_of_buffer (); |
1872 (note, we are inside ifdef PDUMP) */ | 1872 (note, we are inside ifdef PDUMP) */ |
1873 { | 1873 { |
1874 reinit_alloc_early (); | 1874 reinit_alloc_early (); |
1875 reinit_gc_early (); | 1875 reinit_gc_early (); |
1876 reinit_symbols_early (); | 1876 reinit_symbols_early (); |
1877 #ifndef MC_ALLOC | 1877 #ifndef NEW_GC |
1878 reinit_opaque_early (); | 1878 reinit_opaque_early (); |
1879 #endif /* not MC_ALLOC */ | 1879 #endif /* not NEW_GC */ |
1880 reinit_eistring_early (); | 1880 reinit_eistring_early (); |
1881 | 1881 |
1882 reinit_console_type_create_stream (); | 1882 reinit_console_type_create_stream (); |
1883 #ifdef HAVE_TTY | 1883 #ifdef HAVE_TTY |
1884 reinit_console_type_create_tty (); | 1884 reinit_console_type_create_tty (); |
2294 #endif /* USE_C_FONT_LOCK */ | 2294 #endif /* USE_C_FONT_LOCK */ |
2295 reinit_vars_of_glyphs (); | 2295 reinit_vars_of_glyphs (); |
2296 reinit_vars_of_glyphs_widget (); | 2296 reinit_vars_of_glyphs_widget (); |
2297 reinit_vars_of_insdel (); | 2297 reinit_vars_of_insdel (); |
2298 reinit_vars_of_lread (); | 2298 reinit_vars_of_lread (); |
2299 #ifndef MC_ALLOC | 2299 #ifndef NEW_GC |
2300 reinit_vars_of_lstream (); | 2300 reinit_vars_of_lstream (); |
2301 #endif /* not MC_ALLOC */ | 2301 #endif /* not NEW_GC */ |
2302 reinit_vars_of_minibuf (); | 2302 reinit_vars_of_minibuf (); |
2303 #ifdef HAVE_SHLIB | 2303 #ifdef HAVE_SHLIB |
2304 reinit_vars_of_module (); | 2304 reinit_vars_of_module (); |
2305 #endif | 2305 #endif |
2306 reinit_vars_of_objects (); | 2306 reinit_vars_of_objects (); |
3237 | 3237 |
3238 fflush (stderr); | 3238 fflush (stderr); |
3239 fflush (stdout); | 3239 fflush (stdout); |
3240 | 3240 |
3241 disksave_object_finalization (); | 3241 disksave_object_finalization (); |
3242 #ifndef MC_ALLOC | 3242 #ifndef NEW_GC |
3243 release_breathing_space (); | 3243 release_breathing_space (); |
3244 #endif /* not MC_ALLOC */ | 3244 #endif /* not NEW_GC */ |
3245 | 3245 |
3246 /* Tell malloc where start of impure now is */ | 3246 /* Tell malloc where start of impure now is */ |
3247 /* Also arrange for warnings when nearly out of space. */ | 3247 /* Also arrange for warnings when nearly out of space. */ |
3248 #ifndef SYSTEM_MALLOC | 3248 #ifndef SYSTEM_MALLOC |
3249 memory_warnings (my_edata, malloc_warning); | 3249 memory_warnings (my_edata, malloc_warning); |