Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.117 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.77; '*S*': 0.01; 'suppose': 0.07; 'http': 0.09; 'assume': 0.14; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'leaks': 0.16; 'losing': 0.16; 'usable': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'meant': 0.20; 'reset': 0.22; 'bytes': 0.24; 'looks': 0.24; '15,': 0.26; 'compare': 0.26; 'right.': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; "doesn't": 0.30; 'waste': 0.30; 'message-id:@mail.gmail.com': 0.30; 'usually': 0.31; 'writes:': 0.31; 'run': 0.32; 'advice': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'ram': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'even': 0.60; 'lost': 0.61; 'browser': 0.61; 'day.': 0.63; 'different': 0.65; 'situation': 0.65; 'request.': 0.70; 'day': 0.76; '485': 0.84; 'action.': 0.84; 'loose': 0.84; 'perspective.': 0.84; 'terrible': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=95fRZwbGFpqTiwdJgfRgTKUNNfuKaohkyICZKvHDAYU=; b=lC04CDqMmEXGzLPdI24HoV7h6+fGMOSz9oPYIY3x7ItZbiDNjrHyGgmDhzmtS8v+hD 63V7brDkwhtSgBUf5p6PwBKe80i8oEAuregzU+x0IE2HMf0I3C24W/+/sh+113KSZJhs sgujc1waJQVd+rWhPSOnMf3aGuRYBeRaMvTHIiYulllk8uNo6yjdt1QcB468/ndKEtvO WcIFOY2lblqr0JyWElRc276ty+btQlWSEiDhNMHpl71PkFgdSL8086Wo8D23rW3Umxea OkE3228DwzC63ZxfWs24nCHYhNvJG7wrln302L18k8AZ2WayEshnH/avKUISWYdAEcVF jq9A== MIME-Version: 1.0 X-Received: by 10.52.117.16 with SMTP id ka16mr1507540vdb.43.1371280907089; Sat, 15 Jun 2013 00:21:47 -0700 (PDT) In-Reply-To: <87y5abyig3.fsf@handshake.de> References: <09917103-b35e-4728-8fea-bcb4ce2bd1af@googlegroups.com> <51ba82b5$0$29997$c3e8da3$5496439d@news.astraweb.com> <87y5abyig3.fsf@handshake.de> Date: Sat, 15 Jun 2013 17:21:46 +1000 Subject: Re: Debugging memory leaks From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371280909 news.xs4all.nl 15978 [2001:888:2000:d::a6]:41056 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48263 On Sat, Jun 15, 2013 at 4:52 PM, dieter wrote: > Chris Angelico 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