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


Groups > comp.lang.python > #72130

Re: help with memory leak

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.009
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'subject:help': 0.08; 'namespace': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'c-level': 0.16; 'cleaned': 0.16; 'cleans': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'function),': 0.16; 'globals': 0.16; 'modules.': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'wed,': 0.18; 'bit': 0.19; 'trying': 0.19; 'memory': 0.22; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'fairly': 0.24; 'cc:2**0': 0.24; 'sort': 0.25; 'header:In-Reply- To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'purely': 0.31; 'run': 0.32; 'subject:with': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'c++': 0.36; "didn't": 0.36; 'two': 0.37; 'track': 0.38; 'sure': 0.39; 'either': 0.39; 'around.': 0.60; 'up,': 0.60; 'more': 0.64; 'caused': 0.69; 'leak': 0.84; 'try,': 0.84; 'to:none': 0.92
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=62fkIwf3uufbszwVT1Q0sLs0nIuoP2/j5a2AxtXWso4=; b=groLXYv4ZCVKTc2JqWlvjKqNddQSbnU4dJPyevFECr376rxKbRootVmLzVL2iou1sK dwry1yFI5V1D0JCRReDCUukHcdx5y0NOAUGt7S823B9kCbWoVnTPOCZVn0NXNrpkAly6 MQoGLXrZMEwgcdhyzHkY3p+XDY8keYryqOT1EJazpvd305gAop7kCye3A+WtDYI/B+Fh 2J1vH5MDtEoIDAZjOaO5fSSVYhwldWm8OB3nwCHqNcIRCsPd10TZlF4+wBRWXQYhhM1D EYLaVDRYK5Jy4jzPGQ0YpOXVDcJrh6wsQYQx10RsefGERViGYFfqsoIBmmRQwZx447Nn ZM5g==
MIME-Version 1.0
X-Received by 10.220.205.3 with SMTP id fo3mr3584536vcb.57.1401223836980; Tue, 27 May 2014 13:50:36 -0700 (PDT)
In-Reply-To <lm2qls$a40$1@ger.gmane.org>
References <lm2qls$a40$1@ger.gmane.org>
Date Wed, 28 May 2014 06:50:36 +1000
Subject Re: help with memory leak
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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>
Newsgroups comp.lang.python
Message-ID <mailman.10375.1401223845.18130.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1401223845 news.xs4all.nl 2860 [2001:888:2000:d::a6]:53667
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:72130

Show key headers only | View raw


On Wed, May 28, 2014 at 5:56 AM, Neal Becker <ndbecker2@gmail.com> wrote:
> I'm trying to track down a memory leak in a fairly large code.  It uses a lot of
> numpy, and a bit of c++-wrapped code.  I don't yet know if the leak is purely
> python or is caused by the c++ modules.

Something to try, which would separate the two types of leak: Run your
program in a separate namespace of some sort (eg a function), make
sure all your globals have been cleaned up, run a gc collection, and
then see if you still have a whole lot more junk around. If that
cleans everything up, it's some sort of refloop; if it doesn't, it's
either a global you didn't find, or a C-level refleak.

ChrisA

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


Thread

Re: help with memory leak Chris Angelico <rosuav@gmail.com> - 2014-05-28 06:50 +1000

csiph-web