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

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

bug#31091: 25.2: Feature Request: auto exit upon memory exhaustion warni


From: Noam Postavsky
Subject: bug#31091: 25.2: Feature Request: auto exit upon memory exhaustion warning
Date: Sun, 08 Apr 2018 09:25:06 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

Boruch Baum <address@hidden> writes:

> As emacs begins to exhaust memory, it begins to grind all system process's
> performance to a halt, which is clearly undesirable. If the user notices
> in time, either because the user is attentive to the mode line or the
> system slow-down, then the user will have an opportunity to gracefully
> exit and restart emacs, but such is not always the case, and should not
> be presumed to always be the case.

If you set the virtual memory limit to 1 or 2 GB (or something
proportional to the amount of physical memory you have) by doing

    ulimit -Sv $((1000 * 1024))

before you start Emacs, instead of allocating until system slow-down,
Emacs should stop with a message:

    Memory exhausted--use C-x s then exit and restart Emacs

Possibly also a warning like

    Emergency (alloc): Warning: past 75% of memory limit

depending on how quickly you approach the limit.

(yes, I've tried this, see 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26952#18)





reply via email to

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