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

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

Re: frames vs. weak hash tables and garbage collection


From: Thien-Thi Nguyen
Subject: Re: frames vs. weak hash tables and garbage collection
Date: Sun, 02 Sep 2007 04:13:58 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux)

() Joe Wells <jbw@csb.bu.edu>
() 01 Sep 2007 21:10:12 -0400

   As long as I am not completely filling swap, is there any way
   that Emacs could even be aware of how much memory I have on the
   machine?

well, i could continue wallowing in my ignorance, but source is
available, so i looked in src/alloc.c.  you will probably want to
do (setq gc-cons-threshold SOME-LOWER-NUMBER), based on:

| gc-cons-threshold is a variable defined in `src/alloc.c'.
| Its value is 400000
| 
| *Number of bytes of consing between garbage collections.
| Garbage collection can happen automatically once this many bytes have been
| allocated since the last garbage collection.  All data types count.
| 
| Garbage collection happens automatically only when `eval' is called.
| 
| By binding this temporarily to a large number, you can effectively
| prevent garbage collection during a part of the program.
| See also `gc-cons-percentage'.

basically, by tweaking this (and perhaps some other gc-FOO vars),
you can make "enough" satisfiable only when it includes the dead frame.

   Do you mean the database interface stuff?  That brings back
   memories!  I last hacked on that in 1992 (I think it was 1992),
   before Emacs 19 came out.

yes, i revived it in 2004: <http://www.gnuvola.org/software/edb/>.
there were some very twisted things mernst did, but it's ok now.
perhaps one of these days EDB will find itself in a git repo or two.

thi




reply via email to

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