Debugging memory leaks

Chris Angelico rosuav at gmail.com
Sat Jun 15 03:21:46 EDT 2013


On Sat, Jun 15, 2013 at 4:52 PM, dieter <dieter at handshake.de> wrote:
> Chris Angelico <rosuav at gmail.com> writes:
>
>> ...
>> It's terrible advice in generality, because it encourages a sloppiness
>> of thinking: "Memory usage doesn't matter, we'll just instruct people
>> to reset everything now and then".
>
> "Memory usage" may matter. But if you loose 1 kb a day, your process
> can run 3 years before you have lost 1 MB. Compare this to the
> 485 MB used when you start "firefox". The situation looks different
> when you loose 10 MB a day.

Right. Everything needs to be scaled. Everything needs to be in
perspective. Losing 1 kilobit per day is indeed trivial; even losing
one kilobyte per day, which is what I assume you meant :), isn't
significant. But it's not usually per day, it's per leaking action.
Suppose your web browser leaks 1024 usable bytes of RAM every HTTP
request. Do you know how much that'll waste per day? CAN you know?

ChrisA



More information about the Python-list mailing list