Hi,

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.

Thanks,


Tim

In reply to Re^2: out of memory problem after undef by sduser81
in thread out of memory problem after undef by sduser81

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.