From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Global Font Lock by default Date: Sat, 29 Oct 2005 23:51:04 +0200 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1130622832 10779 80.91.229.2 (29 Oct 2005 21:53:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 29 Oct 2005 21:53:52 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 29 23:53:51 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EVycx-0001fj-83 for ged-emacs-devel@m.gmane.org; Sat, 29 Oct 2005 23:52:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVycu-0008Jn-R1 for ged-emacs-devel@m.gmane.org; Sat, 29 Oct 2005 17:52:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EVycO-0008JE-5S for emacs-devel@gnu.org; Sat, 29 Oct 2005 17:52:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EVycK-0008Ie-Fy for emacs-devel@gnu.org; Sat, 29 Oct 2005 17:52:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVycK-0008IZ-9b for emacs-devel@gnu.org; Sat, 29 Oct 2005 17:52:00 -0400 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EVycF-0004Qn-6e; Sat, 29 Oct 2005 17:51:55 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id 4BB12262842; Sat, 29 Oct 2005 23:51:51 +0200 (CEST) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Sat, 29 Oct 2005 16:34:08 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:45113 Archived-At: "Richard M. Stallman" writes: > The main obstacle to enabling Global Font Lock by default > was that it uses more memory and cause an Emacs session to > die sooner. Die? Sooner? Buy more RAM then! > > I've fixed some bugs in the way memory full is handled. !MEM FULL! > should appear in the mode line once Emacs can't get more Lisp memory. > If you kill things and that results in making space available, !MEM > FULL! should disappear. I don't recall ever to have experienced a memory full in emacs, so I'm puzzled about the amount of changes related to that specific problem in emacs 22 (when memory is more plenty than ever?) > > However, this does not work. The reason is that the value > of BYTES_USED, which I believe is obtained from mallinfo, > does not seem to decrease even when a large buffer is killed. This approach is probably not very protable. Can't you just try to malloc (and free) 10000 bytes, and report MEM FULL if it fails? Maybe you could add a "memory-full-hook" which could contain functions to be run when memory runs full -- this could involve turning off font-lock, kill some buffers (which?), and other things that may free up memory. -- Kim F. Storm http://www.cua.dk