Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.news.ox.ac.uk!news.ox.ac.uk!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'debugging': 0.07; 'agree,': 0.09; 'counting': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'thread': 0.14; '(and,': 0.16; '(it': 0.16; 'add,': 0.16; 'antoine': 0.16; 'non-trivial': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'record,': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'trying': 0.19; 'memory': 0.22; 'header:User-Agent:1': 0.23; 'certainly': 0.24; 'typical': 0.24; 'extension': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; "i'd": 0.34; 'problem': 0.35; 'tool': 0.35; 'objects': 0.35; 'really': 0.36; 'useful': 0.36; 'subject:?': 0.36; 'wrong': 0.37; 'to:addr:python-list': 0.38; 'issue': 0.38; 'track': 0.38; 'expensive': 0.39; 'though,': 0.39; 'use.': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'most': 0.60; 'entire': 0.61; 'from:charset:utf-8': 0.61; 'great': 0.65; 'walk': 0.74; 'leak.': 0.84; 'received:hr': 0.84; 'situations,': 0.84; 'subject:skip:g 10': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: =?UTF-8?B?SnVya28gR29zcG9kbmV0acSH?= Subject: Re: What does gc.get_objects() return? Date: Mon, 17 Mar 2014 18:53:24 +0100 Organization: PKE sistemi d.o.o. References: <5320BD3F.5030509@mrabarnett.plus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 78-0-199-48.adsl.net.t-com.hr User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395078822 news.xs4all.nl 2885 [2001:888:2000:d::a6]:59409 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68442 Hi. On 17.3.2014. 18:18, Antoine Pitrou wrote: > All in all, though, gc.get_objects() is an expensive function call (it > will walk the entire graph of objects tracked by the GC, which can be very > large in non-trivial applications), so it's really only useful for > debugging (and, I'd add, for low-level debugging). In most situations, > gc.get_objects() is certainly the wrong tool to use. I agree, and for the record, we were using it for debugging when I started this thread - trying to track down a memory leak. :-) gc.get_objects() turned out to be of great help with in resolving the issue - in the end we tracked it down to a typical reference counting problem in a Python extension DLL. *doh* Best regards, Jurko Gospodnetić