Re: Trying to reduce SBCL memory usage



"Trastabuga" == Trastabuga <lispercat@xxxxxxxxx> writes:

Trastabuga> Is it ok for the lisp image to be so big?

Yes, this is normal. SBCL will *allocate* a huge amount of memory but
only *use* the appropriate fraaction of it. Other implementation does
the same thing. At least on Linux, you can allocate more memory than
you have as long you do not actually use too much, everything till run
fine. This is also sometimes referred to as "overcommit" in memory
allocation.

Why SBCL is handling its memory like that I am not entirely sure, but
I guess it has something to do with the layout of memory and what data
is stored where. The OS memory management system is quite clever and
will pull in only the stuff that is actually used.


------------------------+-----------------------------------------------------
Christian Lynbech | christian #\@ defun #\. dk
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
- petonic@xxxxxxx (Michael A. Petonic)
.



Relevant Pages

  • Re: SBCL performance on OS X
    ... > program that just gobbles up memory until the Lisp process dies. ... between the speed of SBCL on an x86 and on a powerpc. ... garbage collection time is proportional to ... If you want to allocate memory ...
    (comp.lang.lisp)
  • Tru64 issues with Infinite limits
    ... An automated test in my nightly build was failing due to Out of Memory ... Cannot allocate block 146 ...
    (comp.unix.tru64)
  • Re: run-time vs compile-time
    ... > offset related to some location (like stack base) somewhere. ... > offset from heap to pi. ... When you allocate an int on the heap, it is allocated at address 1. ... application has a given amount of memory it can use as it wishes. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: run-time vs compile-time
    ... > offset related to some location (like stack base) somewhere. ... > offset from heap to pi. ... When you allocate an int on the heap, it is allocated at address 1. ... application has a given amount of memory it can use as it wishes. ...
    (comp.lang.cpp)
  • Re: Sharing memory between kernelspace and userspace
    ... deallocate, on a totally dynamic basis, userspace ... Let userspace allocate shared memory visible to multiple ... and pass that into the kernel for it to write to. ...
    (Linux-Kernel)