A few things to think about:
Do you have a memory leak, or do you simply have memory consumption? Test::Memory::Cycle is a good way to determine if you have self-referential data structures in a program. (See also the other CPAN modules which it uses.)
Is there memory pressure? (If there isn’t, then the point-of-view of the always lazy operating system will be, “always room for one more!” And, it is absolutely correct.) The metrics produced by commands such as ps are only the roughest of indicators. What you are really interested in is paging, particularly page steals, which is the actual indicator that something actually hurts. If you don’t have pain, you don’t have a problem.
Don’t guess ... measure. If you suspect that excessive memory consumption is the root cause of your problem, demonstrate it.
“Chips are cheap” now, whereas time is as expensive as ever. I’m not talking about computer time here ... I’m talking about your own. Sometimes the very best way to construct a program is to use the strongest software tools you can, then deal with any memory issues that actually develop (don’t borrow trouble ...) by “throwing silicon at it.” After all, it’s only sand ...
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- 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
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||