Rakudo and Fakecutable Memory Requirements

Patrick R. Michaud pmichaud at pobox.com
Sat Aug 28 19:24:15 UTC 2010


On Fri, Aug 27, 2010 at 07:18:07PM -0700, chromatic wrote:
> I've been reviewing memory leaks and memory usage in Rakudo.  A series of big 
> (bigger than 1Mb) allocations occurs as part of loading Rakudo from the perl6 
> fakecutable.  As far as I can tell, it's completely unnecessary: it's 
> PackFile_new() reading the contents of the contained packfile into memory.
> 
> As the fakecutable already contains this packfile in a native form as part of 
> the executable, there's no need to copy this memory, and we can save Rakudo a 
> few MB.

I've also wondered if it would be better for Rakudo to change its fakecutable
to something that does a 'load_language' opcode to load the perl6.pbc file
and then continues from there.  This would reduce the size of the fakecutable
substantially, and might be more in line with what Parrot is likely to
normally expect.  This might also be another approach to reducing the
overall memory allocations.

One possible downside is that you might not always get the perl6.pbc that
you expect to get (e.g., if one file shadows another).

Comments or reactions?

Pm


More information about the parrot-dev mailing list