Well, since you're using Win32, you should get PSTools from SysInternals and get a "better" profile of when/where your app is using memory. I've whipped up a demo of what I'm suggesting:

C:\>perl -e "print grep(/Perl /,qx[pslist -m Perl])" Name Pid VM WS WS Pk Priv Faults NonP Page PageFile Perl 1632 28236 1416 1416 592 355 2 13 592 C:\>perl -MWin32::GUI -e "print grep(/Perl /,qx[pslist -m Perl])" Name Pid VM WS WS Pk Priv Faults NonP Page PageFile Perl 1516 34000 3200 3208 2680 802 3 17 2680 C:\>perl -MWin32::GUI -e "$main = Win32::GUI::Window->new(-name => 'Ma +in' , -width => 100, -height => 100);print grep(/Perl /,qx[pslist -m Perl] +)" Name Pid VM WS WS Pk Priv Faults NonP Page PageFile Perl 1632 34000 3240 3248 2684 812 3 17 2684

By sprinkling pslist in your app and logging its output, you should get a better idea about what's going on. BTW, 'WS' is the number reported by Task Manager.

Update: Added column headings to the pslist output for clarity.

--
Don't be too proud of this technological terror you've constructed...

In reply to Re^2: talking about memory... by Solo
in thread talking about memory... by primus

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.