[Larceny-users] freezing for garbage collection?

William D Clinger will at ccs.neu.edu
Wed Mar 5 10:02:46 EST 2008


Matt Parker wrote:
> I have been using chicken scheme already and it doesn't ever freeze the
> screen from garbage collection (I don't know why not).  It also happens
> to be quite slow compared to larceny or even maybe gambit-c.  I tried
> using gambit once and it did the same freezes.

In that case, there is one more thing you should try.

Chicken doesn't attempt to collect compiled code or
static data.  Larceny does, and I think that's the
most likely reason you're noticing these "freezes"
in Larceny but not Chicken.  You can prevent Larceny
from attempting to collect your compiled code and
static data by creating your own heap image that
contains your entire program, like this:

    % larceny -stopcopy
    > (load "myprogram")  ; load your entire program,
                          ; but don't start it
    > (dump-interactive-heap "myprogram.heap")
    > (exit)

(Instead of dump-interactive-heap, you might prefer to
use dump-heap; see the Larceny User Manual.)

Then create a split heap:

    % larceny -heap myprogram.heap -reorganize-and-dump

That creates myprogram.heap.split, which you can rename
and use as your initial heap:

    % mv myprogram.heap.split mypgm
    % larceny -heap mypgm -areas 3

If that doesn't help, then we might have been wrong in
thinking the freezes are caused by garbage collection.

Will



More information about the Larceny-users mailing list