|laziness, impatience, and hubris|
Re^2: out of memory problem after undefby sduser81 (Novice)
|on Dec 03, 2008 at 19:27 UTC||Need Help??|
Thanks for the reply.
Regarding allocation of memory for the AoH, I currently don't see a way of making that more efficient, because in context of the script where this is used, this structure is built up over time.
Also, this seems like a fundamental problem with using such structures in Perl on Win32. By the way, I am using ActiveState ActivePerl distribution, if this makes a difference.
Based on what you said, because I have this huge AoH, memory is fragmented in small chunks and it can't be easily reused for a large array. Do you, or anyone else, know if there is a way to force Perl to defragment its memory pool to enable reallocation of the freed memory?
I tried to preallocate the array, but there is not enough system memory, so Perl runs out of memory.