[Larceny-users] GC options

Felix Klock felixluser at pnkfx.org
Wed Jan 24 00:45:33 EST 2007


On Jan 23, 2007, at 5:13 PM, William D Clinger wrote:

> Sven asked:
>> Are there any ways to exclude large read only structures from GC
>> (besides using a database or similar)?
>
> Not exactly, but the -reorganize-and-dump option (which
> requires the -stopcopy option) allows you to dump a new
> heap image after loading your program and its structures
> into Larceny.  When you use that dumped heap for a later
> session of Larceny, the dumped code and data structures
> will be traced but never copied.

If my memory serves me right, any kind of dumped heap ends up having  
its data loaded into the static area (the area where structures are  
traced but not copied).  All of the objects in any sort of heap that  
you dump (e.g. with the dump-interactive-heap procedure) will be  
treated as non-collectable.

So, strictly speaking, you need not use -reorganize-and-dump to get  
the effects that Will described above.

There is another reason to use -reorganize-and-dump on IA32 Sassy  
Native Larceny.  Any objects that are not part of the statically  
loaded heap will be all mixed together in the system's memory; this  
includes codevectors and mutable data.  Mutations to data that is  
allocated close to a cached codevector will cause the processor to  
automatically invalidate its code/trace cache, causing performance  
degradation.  (My understanding is that this is especially disastrous  
on Intel chips.)

The -reorganize-and-dump option will generate a new heap file with  
the objects partitioned into two areas: one for the codevectors, and  
another for everything else.  This can yield significant performance  
gains on IA32, because mutations to data should not affect the code  
cache after such partitioning is performed.  (I will probably have  
concrete numbers on the benefits of doing this in the next day or two.)

A future version of Larceny's memory manager should do this sort of  
partitioning automatically; but for the time being, I don't think  
there is a reliable way to get this effect without using -reorganize- 
and-dump.

-Felix




More information about the Larceny-users mailing list