comparison src/emacs.c @ 2994:ec5f23ea6d2e

[xemacs-hg @ 2005-10-14 01:21:57 by ben] add gc percentage threshold to mc-alloc config.h.in, alloc.c, dumper.c, emacs.c, lrecord.h, mc-alloc.c, mc-alloc.h, symbols.c: Rename MC_ALLOC_TYPE_STATS to ALLOC_TYPE_STATS, since (with refactoring) this is not really specific to mc-alloc. Generalize code to implement the GC % threshold for garbage collecting. Rename `lrecord-stats' to `object-memory-usage-stats' (defined when not mc-alloc, too). Rename `memory-usage' to `total-memory-usage' and add `object-memory-usage'. Bump gc_cons_threshold to 2,000,000 (suggestion by Stephen Turnbull). Avoid use of C++ reserved word `catch'. Change address for crash reporting to xemacs-beta@xemacs.org from crashes@xemacs.org. new -> new_ in emacs.c. Turn on _CRT_SECURE_NO_DEPRECATE under Visual C++ to avoid tons of warnings in VC8.
author ben
date Fri, 14 Oct 2005 01:22:01 +0000
parents 414a64af46c9
children b7f26b2f78bd
comparison
equal deleted inserted replaced
2993:49316578f12d 2994:ec5f23ea6d2e
917 #endif 917 #endif
918 { 918 {
919 if (!restart) 919 if (!restart)
920 { 920 {
921 init_mc_allocator (); 921 init_mc_allocator ();
922 #ifdef MC_ALLOC_TYPE_STATS 922 #ifdef ALLOC_TYPE_STATS
923 init_lrecord_stats (); 923 init_lrecord_stats ();
924 #endif /* not MC_ALLOC_TYPE_STATS */ 924 #endif /* ALLOC_TYPE_STATS */
925 } 925 }
926 } 926 }
927 #endif /* MC_ALLOC */ 927 #endif /* MC_ALLOC */
928 928
929 #ifdef NeXT 929 #ifdef NeXT
1215 /* If we have the form --display=NAME, 1215 /* If we have the form --display=NAME,
1216 convert it into -d name. 1216 convert it into -d name.
1217 This requires inserting a new element into argv. */ 1217 This requires inserting a new element into argv. */
1218 if (dpy != 0 && skip_args - count_before == 1) 1218 if (dpy != 0 && skip_args - count_before == 1)
1219 { 1219 {
1220 Wexttext **new = xnew_array (Wexttext *, argc + 2); 1220 Wexttext **new_ = xnew_array (Wexttext *, argc + 2);
1221 int j; 1221 int j;
1222 1222
1223 for (j = 0; j < count_before + 1; j++) 1223 for (j = 0; j < count_before + 1; j++)
1224 new[j] = argv[j]; 1224 new_[j] = argv[j];
1225 new[count_before + 1] = WEXTSTRING ("-d"); 1225 new_[count_before + 1] = WEXTSTRING ("-d");
1226 new[count_before + 2] = dpy; 1226 new_[count_before + 2] = dpy;
1227 for (j = count_before + 2; j <argc; j++) 1227 for (j = count_before + 2; j <argc; j++)
1228 new[j + 1] = argv[j]; 1228 new_[j + 1] = argv[j];
1229 argv = new; 1229 argv = new_;
1230 argc++; 1230 argc++;
1231 } 1231 }
1232 /* Change --display to -d, when its arg is separate. */ 1232 /* Change --display to -d, when its arg is separate. */
1233 else if (dpy != 0 && skip_args > count_before 1233 else if (dpy != 0 && skip_args > count_before
1234 && argv[count_before + 1][1] == '-') 1234 && argv[count_before + 1][1] == '-')
2911 2911
2912 DEFUN_NORETURN ("run-emacs-from-temacs", Frun_emacs_from_temacs, 0, MANY, 0, /* 2912 DEFUN_NORETURN ("run-emacs-from-temacs", Frun_emacs_from_temacs, 0, MANY, 0, /*
2913 Do not call this. It will reinitialize your XEmacs. You'll be sorry. 2913 Do not call this. It will reinitialize your XEmacs. You'll be sorry.
2914 */ 2914 */
2915 /* If this function is called from startup.el, it will be possible to run 2915 /* If this function is called from startup.el, it will be possible to run
2916 temacs as an editor using 'temacs -batch -l loadup.el run-temacs', instead 2916 temacs as an editor using `temacs -batch -l loadup.el run-temacs', instead
2917 of having to dump an emacs and then run that (when debugging emacs itself, 2917 of having to dump an emacs and then run that (when debugging emacs itself,
2918 this can be much faster)). [Actually, the speed difference isn't that 2918 this can be much faster)). [Actually, the speed difference isn't that
2919 much as long as your filesystem is local, and you don't end up with 2919 much as long as your filesystem is local, and you don't end up with
2920 a dumped version in case you want to rerun it. This function is most 2920 a dumped version in case you want to rerun it. This function is most
2921 useful when used as part of the `make all-elc' command. --ben] 2921 useful when used as part of the `make all-elc' command. --ben]
3470 "Your version of XEmacs was distributed with a PROBLEMS file that may describe\n" 3470 "Your version of XEmacs was distributed with a PROBLEMS file that may describe\n"
3471 "your crash, and with luck a workaround. Please check it first, but do report\n" 3471 "your crash, and with luck a workaround. Please check it first, but do report\n"
3472 "the crash anyway.\n\n" 3472 "the crash anyway.\n\n"
3473 #ifdef INFODOCK 3473 #ifdef INFODOCK
3474 "Please report this bug by selecting `Report-Bug' in the InfoDock menu, or\n" 3474 "Please report this bug by selecting `Report-Bug' in the InfoDock menu, or\n"
3475 "(last resort) by emailing `crashes@xemacs.org' -- note that this is for XEmacs\n" 3475 "(last resort) by emailing `xemacs-beta@xemacs.org' -- note that this is for\n"
3476 "in general, not just Infodock." 3476 "XEmacs in general, not just Infodock."
3477 #else 3477 #else
3478 "Please report this bug by invoking M-x report-emacs-bug, or by selecting\n" 3478 "Please report this bug by invoking M-x report-emacs-bug, or by selecting\n"
3479 "`Send Bug Report' from the Help menu. If that won't work, send ordinary\n" 3479 "`Send Bug Report' from the Help menu. If that won't work, send ordinary\n"
3480 "email to `crashes@xemacs.org'." 3480 "email to `xemacs-beta@xemacs.org'."
3481 #endif 3481 #endif
3482 " *MAKE SURE* to include this entire output\n" 3482 " *MAKE SURE* to include this entire\n"
3483 "from this crash, especially including the Lisp backtrace, as well as the\n" 3483 "output from this crash, especially including the Lisp backtrace, as well as\n"
3484 "XEmacs configuration from M-x describe-installation (or equivalently, the\n" 3484 "the XEmacs configuration from M-x describe-installation (or equivalently,\n"
3485 "file `Installation' in the top of the build tree).\n" 3485 "the file `Installation' in the top of the build tree).\n"
3486 #ifdef _MSC_VER 3486 #ifdef _MSC_VER
3487 "\n" 3487 "\n"
3488 "If you are fortunate enough to have some sort of debugging aid installed\n" 3488 "If you are fortunate enough to have some sort of debugging aid installed\n"
3489 "on your system, for example Visual C++, and you can get a C stack backtrace,\n" 3489 "on your system, for example Visual C++, and you can get a C stack backtrace,\n"
3490 "*please* include it, as it will make our life far easier.\n" 3490 "*please* include it, as it will make our life far easier.\n"