Hello!
I am writing presently an AI for use with ulisp and I face the following issue - pertaining not just to ulisp:
I) MAX CONS CELLS
How can I “keep track” how many cons cells my function is using while running, maximally? I.e. I define some starting point, then the system begins to track cell usage, and tries to periodically find out how many cells are in use. - I understand I could do something with (progn (room) (functioncall) … but is there something like some variable or debugging feature I might use, i.e. something more elegant?
II) LIMIT CONS CELLS IN CONVENTIONAL CL
Is there some way, too, to start some free Common Lisp implementation with a limit on the cons cells? - This is my main problem: I work super-creatively and freely on my multi-GB-machine, favouring a recursive (instead of iterative) style, and practically never running out of memory, only facing occasional trouble with speed. But with ulisp… memory ALWAYS seems to be an issue, and the difficulty to estimate makes it hard for me to port over my stuff. (Workaround: I figured out in Clisp I can say “clisp -m 100k” and indeed, generating lists of over 235 elements crashes and resets it, which is good, but I found no way to go for the cons cells themselves.)
I must say, the latest thing - Metro M4 Grand Central - got me super-interested, because 30K cons cells is, if I remember correctly, about that what you would get on an IBM 7094, i.e. a “real, big” machine of the early age.
Thank you!