From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.bugs Subject: Re: frames vs. weak hash tables and garbage collection Date: Sun, 02 Sep 2007 04:13:58 +0200 Message-ID: <87abs5n7a1.fsf@gnuvola.org> References: <86wsvdvmkb.fsf@macs.hw.ac.uk> <86y7fru45n.fsf@macs.hw.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1188699311 12764 80.91.229.12 (2 Sep 2007 02:15:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 2 Sep 2007 02:15:11 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Joe Wells Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 02 04:15:08 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IRezQ-0007Me-CI for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Sep 2007 04:15:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IRezP-0007Ps-46 for geb-bug-gnu-emacs@m.gmane.org; Sat, 01 Sep 2007 22:15:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IRez2-0007PL-EW for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2007 22:14:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IRez1-0007P9-1z for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2007 22:14:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IRez0-0007P6-SD for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2007 22:14:38 -0400 Original-Received: from ppp-144-38.21-151.libero.it ([151.21.38.144] helo=localhost.localdomain) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IRez0-0000C5-Bn for bug-gnu-emacs@gnu.org; Sat, 01 Sep 2007 22:14:38 -0400 Original-Received: from ttn by localhost.localdomain with local (Exim 4.63) (envelope-from ) id 1IReyM-0001EK-BE; Sun, 02 Sep 2007 04:13:58 +0200 In-Reply-To: (Joe Wells's message of "01 Sep 2007 21\:10\:12 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Genre and OS details not recognized. X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16478 Archived-At: () Joe Wells () 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: . 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