Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: What is heating the memory here? hashlib? Date: Sun, 14 Feb 2016 09:45:00 +1100 Lines: 15 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 9jBDikKwP2drWRAtICkkTA8tNziFRLNwhf1k5D9+GARw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'context': 0.05; 'cc:addr :python-list': 0.09; 'function),': 0.09; ':-)': 0.12; '2016': 0.16; 'constants': 0.16; 'file:"': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'paulo': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'somewhere.': 0.16; 'usage,': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'meant': 0.22; 'assuming': 0.22; 'cycles': 0.22; 'am,': 0.23; 'feb': 0.23; 'header:In-Reply-To:1': 0.24; 'header': 0.24; 'message-id:@mail.gmail.com': 0.27; '14,': 0.27; 'otherwise.': 0.27; 'if,': 0.29; 'received:209.85.213.174': 0.29; "i'm": 0.30; 'class': 0.33; 'ram': 0.33; 'file': 0.34; 'received:google.com': 0.35; 'returning': 0.35; 'too': 0.36; 'received:209.85': 0.36; '(and': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'subject:the': 0.39; 'your': 0.60; 'more': 0.63; 'chrisa': 0.84; 'size?': 0.84; 'subject:here': 0.84; 'to:none': 0.91 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:cc :content-type; bh=L650RJm7S9E/io/a239s15rtuhHtz0Am2Y4fnduBjD4=; b=hWgepFdfEQWSgCL9atLvEzsLSsdfYkZrOZxtuTcA2yfj2uG7eLedkLARhwmoY3H8Ea zTHHivmHcFwcU76OGVBFhUsdqgUEGmV02govIin+jdGZWutTByMGqC0qAbMhTP9/nFUG dKX0COFqDRIvusVZvvl0ZKpjpdpyBsK8oVm1NSZmkw/sxwb9fdSQRlbQcOfu7AWh9+B5 Q/BRkCWQPas1HrOgQzYLtW8pIZwWSnur7IjJS2Ps9iMDZrpTtjJ5r3Yi0KGVGZUCg4RR kna9zHtawSvMQC8v/Frw4v3OAVMy80QIU0n8J544UPGShJU5c7QqaS6XfIEehl0eBOrr /59A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-type; bh=L650RJm7S9E/io/a239s15rtuhHtz0Am2Y4fnduBjD4=; b=hkAwb/8jsUTudWrfLwMJi8ZoTQv6yz9CW6mCe7iV/xEdhU8+VrcryDTvxGNoCCafQp xdG51VLcUwGaUp83ZXb2NXtp4JoCpIypTAwgVi/Pq5p9bNfXD4Xi7Ntc5CpsABiE408U +UbxlfFLBFm63SbsCgX8DHIdyfzgzi4CnvLqfD5GdTPXUc3y7F0QwvLnPeEuatOTEkC8 wUWvyD+S43RxFKzFdn+nR0VSWRSQMKRXe5wourf3Dgermfw5iWN+qDHQIGx1OdLldNbI gYiYl+tvDx56SnZQqxocfccywc575hi13AwLLIjU1A4kYv9tFSaVSXo9aRNRuEv+4WH+ RHrw== X-Gm-Message-State: AG10YOQ4x6I4Rvu8FSNkMvjgP7xg2QtuKTJFvjDTUUnHiUfgSqARzXTA8AII2FHpE5Un3ckmWZKjZHA2593r3g== X-Received: by 10.50.111.169 with SMTP id ij9mr5158575igb.92.1455403500186; Sat, 13 Feb 2016 14:45:00 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:102894 On Sun, Feb 14, 2016 at 9:26 AM, Paulo da Silva wrote: > I meant eating! :-) Heh, "heating" works too - the more you use memory, the more it heats up :) I'm assuming this is inside "class File:" and you have class members for your constants like header size? There's no context for the name "File" otherwise. What happens if, after hashing each file (and returning from this function), you call gc.collect()? If that reduces your RAM usage, you have reference cycles somewhere. ChrisA