From 1673df2e0d9f5c62211b6a9c89b6886ca288bde8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Sat, 2 Apr 2005 12:05:38 +0000 Subject: [PATCH] * alloc.c (allocate_string_data): Call BLOCK_INPUT before calling mallopt. * ralloc.c (r_alloc_init): Ditto. --- src/ChangeLog | 7 +++++++ src/alloc.c | 4 ++++ src/ralloc.c | 4 +++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9518de3af8f..ef635f206bd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2005-04-02 Jan Dj,Ad(Brv + + * alloc.c (allocate_string_data): Call BLOCK_INPUT before calling + mallopt. + + * ralloc.c (r_alloc_init): Ditto. + 2005-04-01 Kenichi Handa * lisp.h (Vascii_upcase_table, Vascii_canon_table, diff --git a/src/alloc.c b/src/alloc.c index d529ab9927b..a907247d21c 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1933,14 +1933,18 @@ allocate_string_data (s, nchars, nbytes) mmap'ed data typically have an address towards the top of the address space, which won't fit into an EMACS_INT (at least on 32-bit systems with the current tagging scheme). --fx */ + BLOCK_INPUT; mallopt (M_MMAP_MAX, 0); + UNBLOCK_INPUT; #endif b = (struct sblock *) lisp_malloc (size + GC_STRING_EXTRA, MEM_TYPE_NON_LISP); #ifdef DOUG_LEA_MALLOC /* Back to a reasonable maximum of mmap'ed areas. */ + BLOCK_INPUT; mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); + UNBLOCK_INPUT; #endif b->next_free = &b->first_data; diff --git a/src/ralloc.c b/src/ralloc.c index 75c25258a9d..e209db72673 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -1255,7 +1255,9 @@ r_alloc_init () #endif #ifdef DOUG_LEA_MALLOC - mallopt (M_TOP_PAD, 64 * 4096); + BLOCK_INPUT; + mallopt (M_TOP_PAD, 64 * 4096); + UNBLOCK_INPUT; #else #ifndef SYSTEM_MALLOC /* Give GNU malloc's morecore some hysteresis -- 2.39.2