G'day sectokia,

I have Perl v5.36.0 (via Perlbrew) running on Cygwin which is running on Win10. Cygwin and Win10 were both updated in the last 24 hours; so, everything is up-to-date.

I ran your code and got the same results: Devel::Size & Devel::Peek showing 4GB; MSWin showing 8GB.

I changed the size from 2**32 (4GB) to 2**31 (2GB). Devel::Size & Devel::Peek are now showing 2GB, as expected; however, MSWin is still showing 8GB.

In both cases, all of the 8GB was freed when the Perl code completed.

I don't want to jump to any conclusions: I'm sure there would be differences between PerlbrewPerl-Cygwin-MSWin and StrawberryPerl-MSWin. However, it does seem to me that issues are possibly related more to MSWin memory management than Perl itself.

I'd suggest rerunning your code with a variety of sizes; checking Devel::Size, Devel::Peek & MSWin memory values for each.

— Ken


In reply to Re: Memory usage double expected by kcott
in thread Memory usage double expected by sectokia

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.