64bit perl and memory usage

Jacqui caren jacqui.caren at ntlworld.com
Wed Jul 18 18:44:58 BST 2007

Toby Corkindale wrote:
> I still think it's worth trying to improve the program though.
> If you use disk for storage instead, the kernel can be quite smart about
> working out which bits need to be cached in ram, or not, for you.

Does perl use something like the old odd/even malloc trick used in the 
70/80's. This allocated two pools of memory and realloced depending upon 
odd or even number of bytes requested.

Interpreters would always ask for even amounts of space for instruction
space and odd amounts for data. This way data was kept distinct from the 
program reducing copy on write issues in paged memory systems.

Not elegant but even in non paged systems such as a YMP it could
make a big difference to an interpreted "language" such as a ECAD
simulation that ran multiple circuit tests threads/forks in ||.


p.s. I assume perls own malloc already does this - or something
far more modern, tricky and clever :-)

More information about the london.pm mailing list