Subject: [clisp-list] Program stack overflow on W32

From: Andrew Cooke <[email-masked]>
Date: Tue, 21 Mar 2000 12:26:45 +0000

Hi,

I have been running a program in an old CLISP on SuSE Linux with no
problems except a lot of paging (CLISP 1997-05-03) - I'm using the -W
argument to get extended addressing (the program is a search that requires
20,000 saved states for backtracking).

To get completion more quickly (and to save the disk on my laptop, which
was getting rather warm), I downloaded a new CLISP binary (1999-07-22) for
a machine I have that runs NT.  However, this gives an error ("Program
Stack Overflow") soon (within about half an hour - the program should run
for maybe 4 or 5 hours) after starting (when total memory used has
increased to just over 100Mb - the machine is configured to have up to 1Gb
virtual memory).  I don't know if this is relevant, but it seems that the
-W switch no longer exists (it is not documented and the error occurs with
or without it).

How can I get the program to run on the NT machine (which is faster and has
more memory than my old laptop)?  Is this a problem with different versions
of CLISP or different OS?

The search uses code based on Norvig's examples (in the Lisp book) - the
main search routine is tail recursive and this problem occurs shortly after
2000 recursions (memory use becomes flat instead of a slight ramp with
ripples, and cpu use drops from 100% to a noisy ~20% a few minutes before
failure - it looks as though a memory limit is being hit).  Is tail
recursion not being optimized out (the same code works on the old
CLISP/Linux up to at least 20,000 iterations)?

Thanks,
Andrew

PS I searched c.l.l and had a look at recent posts on this archive (also
searched for program stack) and couldn't find an answer.

http://www.andrewcooke.free-online.co.uk/index.html