mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-29 19:48:19 +00:00
* alloc.c (make_interval, allocate_string)
(allocate_string_data, make_float, Fcons, allocate_vectorlike) (Fmake_symbol, allocate_misc): Use BLOCK_INPUT when accessing global variables.
This commit is contained in:
parent
cd7070ada9
commit
e2984df0ef
@ -1,3 +1,10 @@
|
||||
2006-01-27 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* alloc.c (make_interval, allocate_string)
|
||||
(allocate_string_data, make_float, Fcons, allocate_vectorlike)
|
||||
(Fmake_symbol, allocate_misc): Use BLOCK_INPUT when accessing
|
||||
global variables.
|
||||
|
||||
2006-01-27 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* dired.c (DIRENTRY_NONEMPTY) [__CYGWIN__]: Don't use d_ino; use
|
||||
|
81
src/alloc.c
81
src/alloc.c
@ -1422,7 +1422,11 @@ make_interval ()
|
||||
{
|
||||
INTERVAL val;
|
||||
|
||||
eassert (!handling_signal);
|
||||
/* eassert (!handling_signal); */
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
if (interval_free_list)
|
||||
{
|
||||
@ -1445,6 +1449,11 @@ make_interval ()
|
||||
}
|
||||
val = &interval_block->intervals[interval_block_index++];
|
||||
}
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
consing_since_gc += sizeof (struct interval);
|
||||
intervals_consed++;
|
||||
RESET_INTERVAL (val);
|
||||
@ -1842,7 +1851,11 @@ allocate_string ()
|
||||
{
|
||||
struct Lisp_String *s;
|
||||
|
||||
eassert (!handling_signal);
|
||||
/* eassert (!handling_signal); */
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
/* If the free-list is empty, allocate a new string_block, and
|
||||
add all the Lisp_Strings in it to the free-list. */
|
||||
@ -1873,6 +1886,10 @@ allocate_string ()
|
||||
s = string_free_list;
|
||||
string_free_list = NEXT_FREE_LISP_STRING (s);
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
/* Probably not strictly necessary, but play it safe. */
|
||||
bzero (s, sizeof *s);
|
||||
|
||||
@ -1920,6 +1937,12 @@ allocate_string_data (s, nchars, nbytes)
|
||||
/* Determine the number of bytes needed to store NBYTES bytes
|
||||
of string data. */
|
||||
needed = SDATA_SIZE (nbytes);
|
||||
old_data = s->data ? SDATA_OF_STRING (s) : NULL;
|
||||
old_nbytes = GC_STRING_BYTES (s);
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
if (nbytes > LARGE_STRING_BYTES)
|
||||
{
|
||||
@ -1974,12 +1997,13 @@ allocate_string_data (s, nchars, nbytes)
|
||||
else
|
||||
b = current_sblock;
|
||||
|
||||
old_data = s->data ? SDATA_OF_STRING (s) : NULL;
|
||||
old_nbytes = GC_STRING_BYTES (s);
|
||||
|
||||
data = b->next_free;
|
||||
b->next_free = (struct sdata *) ((char *) data + needed + GC_STRING_EXTRA);
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
data->string = s;
|
||||
s->data = SDATA_DATA (data);
|
||||
#ifdef GC_CHECK_STRING_BYTES
|
||||
@ -2560,7 +2584,11 @@ make_float (float_value)
|
||||
{
|
||||
register Lisp_Object val;
|
||||
|
||||
eassert (!handling_signal);
|
||||
/* eassert (!handling_signal); */
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
if (float_free_list)
|
||||
{
|
||||
@ -2587,6 +2615,10 @@ make_float (float_value)
|
||||
float_block_index++;
|
||||
}
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
XFLOAT_DATA (val) = float_value;
|
||||
eassert (!FLOAT_MARKED_P (XFLOAT (val)));
|
||||
consing_since_gc += sizeof (struct Lisp_Float);
|
||||
@ -2681,7 +2713,11 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0,
|
||||
{
|
||||
register Lisp_Object val;
|
||||
|
||||
eassert (!handling_signal);
|
||||
/* eassert (!handling_signal); */
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
if (cons_free_list)
|
||||
{
|
||||
@ -2707,6 +2743,10 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0,
|
||||
cons_block_index++;
|
||||
}
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
XSETCAR (val, car);
|
||||
XSETCDR (val, cdr);
|
||||
eassert (!CONS_MARKED_P (XCONS (val)));
|
||||
@ -2880,8 +2920,17 @@ allocate_vectorlike (len, type)
|
||||
consing_since_gc += nbytes;
|
||||
vector_cells_consed += len;
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
p->next = all_vectors;
|
||||
all_vectors = p;
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
++n_vectors;
|
||||
return p;
|
||||
}
|
||||
@ -3162,6 +3211,10 @@ Its value and function definition are void, and its property list is nil. */)
|
||||
|
||||
eassert (!handling_signal);
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
if (symbol_free_list)
|
||||
{
|
||||
XSETSYMBOL (val, symbol_free_list);
|
||||
@ -3183,6 +3236,10 @@ Its value and function definition are void, and its property list is nil. */)
|
||||
symbol_block_index++;
|
||||
}
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
p = XSYMBOL (val);
|
||||
p->xname = name;
|
||||
p->plist = Qnil;
|
||||
@ -3242,7 +3299,11 @@ allocate_misc ()
|
||||
{
|
||||
Lisp_Object val;
|
||||
|
||||
eassert (!handling_signal);
|
||||
/* eassert (!handling_signal); */
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
BLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
if (marker_free_list)
|
||||
{
|
||||
@ -3266,6 +3327,10 @@ allocate_misc ()
|
||||
marker_block_index++;
|
||||
}
|
||||
|
||||
#ifndef SYNC_INPUT
|
||||
UNBLOCK_INPUT;
|
||||
#endif
|
||||
|
||||
--total_free_markers;
|
||||
consing_since_gc += sizeof (union Lisp_Misc);
|
||||
misc_objects_consed++;
|
||||
|
Loading…
Reference in New Issue
Block a user