emacs-devel
[Top][All Lists]
Advanced

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

Re: Global Font Lock by default


From: Kim F. Storm
Subject: Re: Global Font Lock by default
Date: Sat, 29 Oct 2005 23:51:04 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Richard M. Stallman" <address@hidden> 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 <address@hidden> http://www.cua.dk





reply via email to

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