Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found