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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subsequent': 0.04; 'purpose.': 0.07; 'python': 0.09; 'spawn': 0.09; 'stating': 0.09; 'subject:None': 0.09; 'subject:python': 0.11; 'result.': 0.15; 'gc.collect()': 0.16; 'hits': 0.16; 'illustration': 0.16; 'received:169.254.3': 0.16; 'received:mgd.msft.net': 0.16; 'received:msft.net': 0.16; 'subject: \n ': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'memory': 0.18; 'to:name:python-list@python.org': 0.20; 'written': 0.20; 'subject:release': 0.22; 'example': 0.23; 'errors': 0.23; 'to:2**1': 0.23; 'seems': 0.23; 'received:169.254': 0.24; 'header:In-Reply-To:1': 0.25; 'piece': 0.29; 'thinks': 0.29; 'received:169': 0.29; 'starts': 0.29; 'that.': 0.30; 'error': 0.30; 'header:Received:8': 0.30; 'not.': 0.32; 'achieving': 0.33; 'allocated': 0.33; 'oracle': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'thanks': 0.34; 'server': 0.35; 'received:bigfish.com': 0.35; 'pm,': 0.35; "won't": 0.35; 'should': 0.36; 'too': 0.36; 'charset:us-ascii': 0.36; 'unable': 0.36; 'subject:: ': 0.38; 'received:10': 0.38; 'to:addr:python.org': 0.39; 'release': 0.39; 'takes': 0.39; 'subject:, ': 0.61; 'back': 0.62; 'bothered': 0.65; 'concerns': 0.65; '2013': 0.84; 'dies.': 0.84; 'subject:\t(': 0.84; 'subject:Set': 0.91; 'subject:del': 0.91; 'luxury': 0.93 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: -1 X-BigFish: VS-1(zz98dI9371Izz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839h8e2h8e3h944hd25hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh15d0h162dh1631h1758h18e1h1946h19b5h1ad9h1b0ahbe9i1155h) From: Wong Wah Meng-R32813 To: Chris Angelico , "python-list@python.org" Subject: RE: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Thread-Topic: Set x to to None and del x doesn't release memory in python 2.7.1 (HPUX 11.23, ia64) Thread-Index: AQHOGwS7MDdu+BQVlka+Vy3C+AgjoZibfvtQ Date: Fri, 8 Mar 2013 09:08:15 +0000 References: <390f0dc5-5750-4849-9433-a19d90cc8566@googlegroups.com> <87zjyhhret.fsf@nautilus.nautilus> <5137d292$0$30001$c3e8da3$5496439d@news.astraweb.com> <78E1273CA6E76A43BB8830A194FF709B0B14D68C@039-SN2MPN1-013.039d.mgd.msft.net> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.228.69.184] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: freescale.com 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362734611 news.xs4all.nl 6968 [2001:888:2000:d::a6]:54166 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40854 The problem is my server hits memory usage threshold, and starts giving me = errors like Oracle unable to spawn off new session stating Out of Memory er= ror and what not. I won't be bothered much if I have the luxury of availabl= e memory for other processes to use. If only if the UNIX understand my conc= erns and release the allocation when I issue gc.collect() or the gc.collect= () takes place. :) =20 On Thu, Mar 7, 2013 at 5:33 PM, Wong Wah Meng-R32813 = wrote: > [] The example is written for illustration purpose. Thanks for=20 > pointing out a better way of achieving the same result. Yes it seems=20 > so that the OS thinks the piece allocated to Python should not be=20 > taken back unless the process dies. :( Don't be too bothered by that. That memory will be reused by Python for sub= sequent allocations.