Mercurial > emacs
changeset 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 | 13cae05372c0 |
children | 2a57a6e6b390 |
files | src/alloc.c |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/alloc.c Wed Apr 30 12:03:53 2003 +0000 +++ b/src/alloc.c Wed Apr 30 12:04:39 2003 +0000 @@ -126,6 +126,12 @@ int gc_in_progress; +/* Nonzero means abort if try to GC. + This is for code which is written on the assumption that + no GC will happen, so as to verify that assumption. */ + +int abort_on_gc; + /* Nonzero means display messages at beginning and end of GC. */ int garbage_collection_messages; @@ -4093,6 +4099,9 @@ int count = SPECPDL_INDEX (); EMACS_TIME t1, t2, t3; + if (abort_on_gc) + abort (); + EMACS_GET_TIME (t1); /* Can't GC if pure storage overflowed because we can't determine