mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-26 15:21:51 -08:00
[emacs]: Block input around the garbage reclamation.
Include blockinput.h.
This commit is contained in:
parent
22f33dd9d2
commit
2d1687d7f4
1 changed files with 12 additions and 0 deletions
12
src/alloca.c
12
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue