emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs hangs up.


From: Jan D.
Subject: Re: Emacs hangs up.
Date: Thu, 8 Jan 2004 15:42:40 +0100

To solve this problem more generally,
maybe we need to put BLOCK_INPUT ... UNBLOCK_INPUT pairs
around the calls to mallopt in allocate_vectorlike.
If mallopt can in effect call malloc, that is necessary.

I wanted to see another backtrace to see if it indeed is a general
problem or not.  But looking at the malloc source in glibc I think
this patch is needed and better.

        Jan D.



*** alloc.c.~1.328.~    Fri Nov 28 15:55:07 2003
--- alloc.c     Thu Jan  8 06:44:43 2004
***************
*** 2498,2504 ****
--- 2498,2506 ----
    /* Prevent mmap'ing the chunk.  Lisp data may not be mmap'ed
       because mapped region contents are not preserved in
       a dumped Emacs.  */
+   BLOCK_INPUT;
    mallopt (M_MMAP_MAX, 0);
+   UNBLOCK_INPUT;
  #endif

    nbytes = sizeof *p + (len - 1) * sizeof p->contents[0];
***************
*** 2506,2512 ****
--- 2508,2516 ----

  #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

    consing_since_gc += nbytes;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]