comparison src/alloc.c @ 50745:fedd03de0f46

(abort_on_gc): New variable. (Fgarbage_collect): Abort if abort_on_gc is set.
author Richard M. Stallman <rms@gnu.org>
date Wed, 30 Apr 2003 12:04:39 +0000
parents a5a77c7717cb
children ffa1dc43c997
comparison
equal deleted inserted replaced
50744:13cae05372c0 50745:fedd03de0f46
123 EMACS_INT gc_cons_threshold; 123 EMACS_INT gc_cons_threshold;
124 124
125 /* Nonzero during GC. */ 125 /* Nonzero during GC. */
126 126
127 int gc_in_progress; 127 int gc_in_progress;
128
129 /* Nonzero means abort if try to GC.
130 This is for code which is written on the assumption that
131 no GC will happen, so as to verify that assumption. */
132
133 int abort_on_gc;
128 134
129 /* Nonzero means display messages at beginning and end of GC. */ 135 /* Nonzero means display messages at beginning and end of GC. */
130 136
131 int garbage_collection_messages; 137 int garbage_collection_messages;
132 138
4090 register int i; 4096 register int i;
4091 int message_p; 4097 int message_p;
4092 Lisp_Object total[8]; 4098 Lisp_Object total[8];
4093 int count = SPECPDL_INDEX (); 4099 int count = SPECPDL_INDEX ();
4094 EMACS_TIME t1, t2, t3; 4100 EMACS_TIME t1, t2, t3;
4101
4102 if (abort_on_gc)
4103 abort ();
4095 4104
4096 EMACS_GET_TIME (t1); 4105 EMACS_GET_TIME (t1);
4097 4106
4098 /* Can't GC if pure storage overflowed because we can't determine 4107 /* Can't GC if pure storage overflowed because we can't determine
4099 if something is a pure object or not. */ 4108 if something is a pure object or not. */