diff options
author | Richard M. Stallman <[email protected]> | 2003-04-30 12:04:39 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 2003-04-30 12:04:39 +0000 |
commit | 3de0effb43c7297a8be998e020afc1a2550cf575 (patch) | |
tree | 54400e6b59874e3aaaaef25d3261df43c1c6756c /src | |
parent | ccbb9ed2e0673e4e69761abc32ceb973a1d3645e (diff) |
(abort_on_gc): New variable.
(Fgarbage_collect): Abort if abort_on_gc is set.
Diffstat (limited to 'src')
-rw-r--r-- | src/alloc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c index 73d1b03413..f82cde61c2 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -126,6 +126,12 @@ EMACS_INT gc_cons_threshold; 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 @@ Garbage collection happens automatically if you cons more than 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 |