[Openmcl-devel] Heap Size

Craig Lanning craig.t.lanning at gmail.com
Fri May 12 16:02:22 PDT 2017


Thanks.  That did what I needed.

Craig

On Fri, 2017-05-12 at 14:48 -0700, R. Matthew Emerson wrote:
> > 
> > On May 12, 2017, at 2:35 PM, Craig Lanning <craig.t.lanning at gmail.c
> > om> wrote:
> > 
> > I've looked through the documentation and can't seem to find the
> > answer
> > to my question.
> > 
> > I'd like to know if there is a way to increase the Heap size?
> > 
> > I have a function defined that is run after each GC
> > completes.  This
> > function prints the currently used memory and the memory size.
> > 
> > When my application runs as a delivered image, the post GC message
> > shows the memory size as 40,108,032 on a 64 bit Linux system.  I
> > would
> > like to set it to something that is considerably larger so that it
> > doesn't run the GC as often.
> > 
> > Is this possible?  If so, how?
> 
> Yes.
> 
> The functions ccl:lisp-heap-gc-threshold, ccl:set-lisp-heap-gc-
> threshold, and ccl:use-lisp-heap-gc-threshold can do this.
> 
> https://ccl.clozure.com/docs/ccl.html#garbage-collection-dictionary
> 
> 
> For example:
> 
> ? (lisp-heap-gc-threshold)
> 33554432
> ? (set-lisp-heap-gc-threshold (* 2 33554432))
> 67239936
> ? (room)
> Approximately 33,292,288 bytes of memory can be allocated 
> before the next full GC is triggered. 
> 
>                    Total Size             Free                 Used
> Lisp Heap:     16815357952 (16421248K)   33292288 (32512K)
> 16782065664 (16388736K)
> Stacks:          11211656 (10949K)   11204424 (10942K)       7232
> (7K)
> Static:          21497872 (20994K)          0 (0K)       21497872
> (20994K)
> 360763.620 MB reserved for heap expansion.
> NIL
> ? (use-lisp-heap-gc-threshold)
> NIL
> ? (room)
> Approximately 67,239,936 bytes of memory can be allocated 
> before the next full GC is triggered. 
> 
>                    Total Size             Free                 Used
> Lisp Heap:     16849305600 (16454400K)   67239936 (65664K)
> 16782065664 (16388736K)
> Stacks:          11211656 (10949K)   11204424 (10942K)       7232
> (7K)
> Static:          21497872 (20994K)          0 (0K)       21497872
> (20994K)
> 360731.250 MB reserved for heap expansion.
> NIL
> 
> 
> 
> 



More information about the Openmcl-devel mailing list