aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorRichard M. Stallman2003-04-30 12:04:39 +0000
committerRichard M. Stallman2003-04-30 12:04:39 +0000
commit3de0effb43c7297a8be998e020afc1a2550cf575 (patch)
tree54400e6b59874e3aaaaef25d3261df43c1c6756c /src/alloc.c
parentccbb9ed2e0673e4e69761abc32ceb973a1d3645e (diff)
downloademacs-3de0effb43c7297a8be998e020afc1a2550cf575.tar.gz
emacs-3de0effb43c7297a8be998e020afc1a2550cf575.zip
(abort_on_gc): New variable.
(Fgarbage_collect): Abort if abort_on_gc is set.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 73d1b034137..f82cde61c27 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -126,6 +126,12 @@ EMACS_INT gc_cons_threshold;
126 126
127int gc_in_progress; 127int gc_in_progress;
128 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
133int abort_on_gc;
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
131int garbage_collection_messages; 137int garbage_collection_messages;
@@ -4093,6 +4099,9 @@ Garbage collection happens automatically if you cons more than
4093 int count = SPECPDL_INDEX (); 4099 int count = SPECPDL_INDEX ();
4094 EMACS_TIME t1, t2, t3; 4100 EMACS_TIME t1, t2, t3;
4095 4101
4102 if (abort_on_gc)
4103 abort ();
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