Subject: [clisp-list] Lisp and Memory-- "Program Stack Overflow"

From: "Justice, Randy -CONT" <[email-masked]>
Date: Wed, 27 Sep 2000 14:00:40 -0500

I trying to do some recursive memory searches.  I have run into a couple of
searches which require large amounts of memory.  I understand that CLISP has
an option of -m to allocate more memory. 

On the NT side, It does not seem to work at all.  On NT, I get about 2000
levels down before "Program Stack Overflow. RESET" regardless of the value
by option -m.  

RedHat Linux seem to have a limit too.  The -m10m gives me about 8000
levels, -m20m gives me about 9500 levels,  and -m40m has the same limit as
-m20m.   

How do I get more memory of CLISP to use?  Or is there a bigger concept that
I am missing?

Thanks in Advance
Randy

---

From: Ricardo Aler Mur <[email-masked]>
Date: Fri, 29 Sep 2000 11:20:12 +0000 (GMT)

For using large amounts of memory, use:

clisp -W

It's a bit slower, though.

Ricardo.
--------
mailto: "Ricardo Aler Mur" <[email-masked]>
http://scalab.uc3m.es/~aler

---

From: Bruno Haible <[email-masked]>
Date: Fri, 29 Sep 2000 14:57:58 +0200 (CEST)

> How do I get more memory of CLISP to use?  Or is there a bigger concept that

CLISP cannot give you more than the default stack size of the
operating system, because the operating system generally doesn't allow
it. On Windows, the stack size needed by a program must be hardwired
in the executable (lisp.exe). On Unix, the maximum stack size is
changeable through the 'ulimit' shell builtin; its use might require
superuser privileges.

Therefore all you can do is
  a) prefer iteration over recursion when you are iterating through
     long lists,
  b) compile your lisp programs, then they eat less stack,
  c) become superuser and use "ulimit -s" to change the stack size,
     then su back to your normal identity and start clisp.

Bruno

---

From: Bruno Haible <[email-masked]>
Date: Fri, 29 Sep 2000 15:05:04 +0200 (CEST)

> For using large amounts of memory, use:

That's a noop today. The "-W" option has effectively been eliminated
in the 1998-09-09 release.

Bruno

---

From: Gerardo Mauricio Sarria <[email-masked]>
Date: Fri, 29 Sep 2000 09:38:17 -0500 (COT)

Hello!

I have been using clisp with a extension called clg (it let to use the
gtk functions in lisp) and it runs OK but it doesn't free the lisp
listener. I don't know if this is because the clg or the clisp.

Can anyone know any about it?
If it is because clisp, is there any function that set the listener free?

Thanks

Gerardo Sarria

---

From: Eric Marsden <[email-masked]>
Date: 29 Sep 2000 17:20:11 +0200

>>>>> "rj" == Justice, Randy -CONT <[email-masked]> writes:

  rj> How do I get more memory of CLISP to use? Or is there a bigger
  rj> concept that I am missing?

you may be running into operating system limits on stack size. Try
increasing them using `ulimit' on linux+bash (don't know the NT
equivalent). 

-- 
Eric Marsden                          <URL:http://www.laas.fr/~emarsden>

---

From: Marco Antoniotti <[email-masked]>
Date: Fri, 6 Oct 2000 10:46:06 -0400

> Date: Fri, 29 Sep 2000 09:38:17 -0500 (COT)
> From: Gerardo Mauricio Sarria <[email-masked]>
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> Sender: [email-masked]
> X-BeenThere: [email-masked]
> X-Mailman-Version: 2.0beta5
> Precedence: bulk
> List-Id: CLISP user discussion <clisp-list.lists.sourceforge.net>
> Content-Length: 502
> 
> Hello!
> 

CLG does some magic with CMUCL to make sure that the listener is
"freed".  I do not know whether you could do the same with CLisp,
although I suppose so.

Cheers

-- 
Marco Antoniotti =============================================================
NYU Bioinformatics Group			 tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                          fax  +1 - 212 - 995 4122
New York, NY 10003, USA				 http://galt.mrl.nyu.edu/valis
             Like DNA, such a language [Lisp] does not go out of style.
			      Paul Graham, ANSI Common Lisp