summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-06-02 17:45:40 +0000
committerRichard M. Stallman <rms@gnu.org>1994-06-02 17:45:40 +0000
commit2d1687d7f4beaba2c578403d00835d2eeecb40c2 (patch)
treed9012718aa0d52b3631e63c09864c83127a43bdf
parent22f33dd9d2e0aa95231fb3d8409a1d26ed6b067d (diff)
downloademacs-2d1687d7f4beaba2c578403d00835d2eeecb40c2.tar.gz
[emacs]: Block input around the garbage reclamation.
Include blockinput.h.
-rw-r--r--src/alloca.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/alloca.c b/src/alloca.c
index bd4932aa445..d1f4d1a302b 100644
--- a/src/alloca.c
+++ b/src/alloca.c
@@ -29,6 +29,10 @@
#endif
#endif
+#ifdef emacs
+#include "blockinput.h"
+#endif
+
/* If compiling with GCC 2, this file's not needed. */
#if !defined (__GNUC__) || __GNUC__ < 2
@@ -176,6 +180,10 @@ alloca (size)
{
register header *hp; /* Traverses linked list. */
+#ifdef emacs
+ BLOCK_INPUT;
+#endif
+
for (hp = last_alloca_header; hp != NULL;)
if ((STACK_DIR > 0 && hp->h.deep > depth)
|| (STACK_DIR < 0 && hp->h.deep < depth))
@@ -190,6 +198,10 @@ alloca (size)
break; /* Rest are not deeper. */
last_alloca_header = hp; /* -> last valid storage. */
+
+#ifdef emacs
+ UNBLOCK_INPUT;
+#endif
}
if (size == 0)