Lisp HUG Maillist Archive

lisp GC

Hi,
I am having difficulty with garbage collection in LispWork 5.0. I am setting a variable to a long list and then clearing that variable by setting it to nil and yet lisp doesn't relinquish that RAM. In fact when I set that variable to another long list it just keeps eating up more of my memory. Anybody have any suggestions on how to get lisp to relinquish this memory? I've tried a bunch of the GC functions like (clean and sweep) and others and it doesn't have any affect.

Any help will be greatly appreciated!

~ Bella Z. Veksler

CogWorks Lab
Department of Cognitive Science
Rensselaer Polytechnic Institute
Carnegie Building
Troy, NY 12180

zafrib@rpi.edu

http://www.cogsci.rpi.edu/zafrib








Re: lisp GC

Bella Z. Veksler wrote:

> I am having difficulty with garbage collection in LispWork 5.0. I am
> setting a variable to a long list and then clearing that variable by
> setting it to nil and yet lisp doesn't relinquish that RAM. In fact
> when I set that variable to another long list it just keeps eating up
> more of my memory. Anybody have any suggestions on how to get lisp to
> relinquish this memory?

I don't have a complete answer to your question.  But if you're
doing this from the REPL, one thing to keep in mind is that the
variables *, ** and *** will keep your data alive for a bit longer
than you might think.

Arthur Lemmens


RE: lisp GC

I'm assuming 32-bit Lispworks here. Depending upon when you're clearing that variable, it's possible each list is being promoted to generation 2, which is not GC'd by default. We encountered something similar last year during the tuning of our system, and found that calling (hcl:mark-and-sweep 2) was usually sufficient. Read the GC docs; they're most informative.
 
Note that the GC in 64-bit Lispworks is completely different (as I understand it), thus the above comments probably don't apply to that platform.
 
-- david
-----Original Message-----
From: owner-lisp-hug@lispworks.com [mailto:owner-lisp-hug@lispworks.com]On Behalf Of Bella Z. Veksler
Sent: Wednesday, October 03, 2007 3:52 PM
To: lisp-hug@lispworks.com
Subject: lisp GC

Hi,
I am having difficulty with garbage collection in LispWork 5.0. I am setting a variable to a long list and then clearing that variable by setting it to nil and yet lisp doesn't relinquish that RAM. In fact when I set that variable to another long list it just keeps eating up more of my memory. Anybody have any suggestions on how to get lisp to relinquish this memory? I've tried a bunch of the GC functions like (clean and sweep) and others and it doesn't have any affect.

Any help will be greatly appreciated!

~ Bella Z. Veksler

CogWorks Lab
Department of Cognitive Science
Rensselaer Polytechnic Institute
Carnegie Building
Troy, NY 12180

zafrib@rpi.edu

http://www.cogsci.rpi.edu/zafrib








Updated at: 2020-12-10 08:45 UTC