[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What does "No more room for LISP objects" mean?

Calvin Clark <ckclark@MIT.EDU> asks:

>	No more room for LISP objects
> What boundary am I hitting?

Some versions of clisp allocate their memory at startup time. The amount
of memory can be specified by the -m command line option. (See the manual
page clisp.man.) When this memory is filled up, you will get the error
you described.

Other versions of clisp allocate memory dynamically. Until the OS refuses
to grant more memory to clisp. (The drawback of this strategy is that some
Unices crash when their RAM or swap space is filled up. The clisp process
will be aborted without any opportunity to save the computation's results.)

> I've only seen this error on DECstation/ULTRIX, not on Sparc/Solaris.

SunOS has a working mmap() system call, which clisp uses for its memory
allocation. This results in the dynamic strategy. On Ultrix, clisp
apparently chooses shared memory (SystemV IPC) for its memory allocation,
and there are so many limits on shared memory that a fixed memory size
is inevitable.

> can someone explain the output of the clisp ``room'' function

The first value is the number of bytes currently occupied by Lisp objects.
The second value is the number of bytes that can be allocated before the
next garbage collection occurs.

Well, this could have been explained in impnotes.txt, but I hate to bother
users with such low-level details.

> ``room'' function, which seems to be still CLtL1, since it takes no
> arguments?

Would you really prefer some more verbose ROOM function?
If you want to reduce your program's memory consumption, you should use
the TIME macro. Perhaps some more sophisticated metering facility should
be invented? - I think that the global values output by ROOM cannot give
useful hints.

                    Bruno Haible