]> git.eshelyaron.com Git - emacs.git/commitdiff
Recommend that the user turn off memory overcommit
authorPo Lu <luangruo@yahoo.com>
Fri, 8 Apr 2022 11:36:03 +0000 (19:36 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 8 Apr 2022 11:36:34 +0000 (19:36 +0800)
* doc/emacs/trouble.texi (Memory Full): Tell the user that Emacs
behaves best with overcommit off, and how to turn it off.

doc/emacs/trouble.texi

index 93f9c779dbf9d71d783f87da0219368598a7314d..f524a820220c4b55ae5842011687d083edbbbb5d 100644 (file)
@@ -296,6 +296,20 @@ editing in the same Emacs session.
 out of memory, because the Buffer Menu needs a fair amount of memory
 itself, and the reserve supply may not be enough.
 
+@cindex memory trouble, GNU/Linux
+  On GNU/Linux systems, the system does not normally report running
+out of memory to Emacs, and can instead randomly kill processes when
+they run out of memory.  We recommend that you turn this behavior off,
+so that Emacs can respond correctly when it runs out of memory, by
+becoming the super user, editing the file @code{/etc/sysctl.conf} to
+contain the following lines, and then running the command @code{sysctl
+-p}:
+
+@example
+vm.overcommit_memory=2
+vm.overcommit_ratio=0
+@end example
+
 @node Crashing
 @subsection When Emacs Crashes