From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: LISP Questions - random, random elements and memory management Date: Thu, 19 Nov 2009 08:44:24 -0500 Organization: A noiseless patient Spider Message-ID: References: <20091118.075428.224836459.jeff@chaosphere.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1258642496 8360 80.91.229.12 (19 Nov 2009 14:54:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2009 14:54:56 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 19 15:54:49 2009 Return-path: Envelope-to: geh-help-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 1NB8PH-0000Tl-SX for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Nov 2009 15:54:48 +0100 Original-Received: from localhost ([127.0.0.1]:33919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NB8PG-0003j0-C9 for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Nov 2009 09:54:46 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.de!feeder.eternal-september.org!eternal-september.org!barmar.motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-X-Trace: news.eternal-september.org U2FsdGVkX1+G71SKaVIUlhpG90A5gdFcUlHN6eGU1Sp9YaDV99iLa/IvGCY3EeQAmCoykL23zkNv+3D7YTpobryhRCefDazVoxCqthE3HaPvXwhFH3pl94bGo0RKGPSv7V4ncg0CksA= Original-X-Complaints-To: abuse@eternal-september.org Original-NNTP-Posting-Date: Thu, 19 Nov 2009 13:44:24 +0000 (UTC) User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Auth-Sender: U2FsdGVkX1+CTZFSX1meGNL0DfuK1NH7ijDUexBi97A= Cancel-Lock: sha1:L0OGlQ3HWJhDE5hqAvWBMYTKi1Y= Original-Xref: news.stanford.edu gnu.emacs.help:174848 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69922 Archived-At: In article , Jeff Clough wrote: > From: Kevin Rodgers > Date: Wed, 18 Nov 2009 20:03:51 -0700 > > > The data *is* in memory. The function is zippy because nth is fast, > > in > > turn because cdr is fast (and implemented in C). And perhaps the cons > > cells for the list are allocated in adjacent memory, if it is > > constructed all at once. > > > > Of course you can put the data (defconst forms) and function (defun) > > in > > the same .el file! > > Um, actually I was looking for a way that would allow me to keep the > data *out* of memory until it was needed, then toss it on the floor > when I was done, that way I'm only eating the RAM *some* of the time > instead of all the time. With my existing scheme, the data is in > memory as soon as the .el file is loaded. How about putting it in a text file that you load into a temporary buffer when you need it? Then kill the buffer when you're done with it. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***