[Larceny-users] Larceny Panic: Can't allocate an object of size ...

Sven Hartrumpf hartrumpf at gmx.net
Sat Feb 6 10:55:13 EST 2016


Hello Will.

You wrote 2016-02-05 14:26:52-05:00:
> Sven wrote:
> 
>> Is there a way to avoid the following compiler crash?
> 
> Sorry about that.

No problem. I know the status of larceny, its limitations and its
strengths. So I can cope with both :-)

> In my experience, this error means Larceny's assembler tried
> to create a single monolithic chunk of x86 machine code whose
> size was the reported 17536520 bytes, which is larger than
> the maximum object size Larceny currently supports.
> 
> The best workaround I know of is to force Larceny's compiler
> to break that one huge chunk of x86 machine code into smaller
> chunks.  You can probably do that using the lambda-optimization
> compiler switch to disable lambda optimization, but that's a
> rather blunt approach even if it works.

It didn't solve the problem.
I will reduce the size of the program by using the flow analysis
from some other Scheme implementation (to determine and eliminate
unused functions given the entry function for the program).
I think this will bring the size below 16 MB.
(Chicken and bigloo manage to compile my
program to statically linked binaries of 5 to 8 MB.)

BTW: Does larceny perform such a reachability analysis for functions?
If so, how could this help here?

> It would be better to identify specific lambda expressions
[...]
Thanks for the idea!
I will try this if other ways fail.

>> This is the 32bit compiler; will the 64bit compiler help here?
> 
> Yes, this problem will mostly go away when we have a 64-bit
> version of Larceny.

That would be really cool ...
If you prepare a 64-bit version, I would recommend to have a look
at the x32 ABI, which combines the strengths of 32-bit and 64-bit
in a spectacular way, if you look at GC-intensive programs.

Ciao
Sven



More information about the Larceny-users mailing list