Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
XP is just a number
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
After reading Does Perl have garbage collection mechanism and how it performs?, I began to wonder how useful it would be to modify my Perl installation to free memory after a refcount hits 0.

You see, I've written a Perl application that I distribute for both Linux and Win32. My Win32 distros include a copy of perl58.dll, since most of my Win32 users don't have Perl installed (or have any desire to install it).

The trouble is that at least two of my users have seen the large amounts of memory my app can use (sometimes up to 28MB - I assume that my usage of Tk and Tk::Photo in particular are part of the problem) and subsequently refused to use my app, insisting that it had memory leaks. I tried to explain that most of that memory gets swapped out to disk anyway, but it was in vain.

So if I modified the Perl source to free its memory after a reference goes out of scope and distributed the recompiled DLL, would that lower my app's memory usage and appease these users?

(Please don't flame me - this is just an idea :)

Bill


In reply to make perl release memory by batkins

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (11)
    As of 2014-04-18 13:09 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      April first is:







      Results (468 votes), past polls