Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #102894

Re: What is heating the memory here? hashlib?

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Chris Angelico <rosuav@gmail.com>
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 <mailman.99.1455403508.22075.python-list@python.org> (permalink)
References <n9o06t$1hjo$1@gioia.aioe.org> <n9oaja$39n$1@gioia.aioe.org>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de 9jBDikKwP2drWRAtICkkTA8tNziFRLNwhf1k5D9+GARw==
Return-Path <rosuav@gmail.com>
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 <n9oaja$39n$1@gioia.aioe.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21rc2
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:102894

Show key headers only | View raw


On Sun, Feb 14, 2016 at 9:26 AM, Paulo da Silva
<p_s_d_a_s_i_l_v_a_ns@netcabo.pt> 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

What is heating the memory here? hashlib? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-02-13 19:29 +0000
  Re: What is heating the memory here? hashlib? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-02-13 22:26 +0000
    Re: What is heating the memory here? hashlib? Chris Angelico <rosuav@gmail.com> - 2016-02-14 09:45 +1100
      Re: What is heating the memory here? hashlib? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-02-14 01:44 +0000
        Re: What is heating the memory here? hashlib? Chris Angelico <rosuav@gmail.com> - 2016-02-14 13:01 +1100
  Re: What is heating the memory here? hashlib? Steven D'Aprano <steve@pearwood.info> - 2016-02-14 13:21 +1100
    Re: What is heating the memory here? hashlib? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-02-15 08:05 +0000
  Re: What is heating the memory here? hashlib? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-02-14 07:04 +0000
    Re: What is heating the memory here? hashlib? INADA Naoki <songofacandy@gmail.com> - 2016-02-14 18:49 +0900
      Re: What is heating the memory here? hashlib? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-02-15 07:38 +0000
    Re: What is heating the memory here? hashlib? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-02-15 02:21 +0000
      Re: What is heating the memory here? hashlib? Johannes Bauer <dfnsonfsduifb@gmx.de> - 2016-02-15 09:12 +0100
        Re: What is heating the memory here? hashlib? Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-02-15 17:29 +0000

csiph-web