Re: memory leak with re.match

2017-07-05 Thread Peter Otten
Mayling ge wrote: > Sorry. The code here is just to describe the issue and is just pseudo > code, That is the problem with your post. It's too vague for us to make sense of it. Can you provide a minimal example that shows what you think is a "memory leak"? Then we can either help you avo

Re: memory leak with re.match

2017-07-05 Thread Mayling ge
Sorry. The code here is just to describe the issue and is just pseudo code, please forgive some typo. I list out lines because I need line context. Sent from Mail Master On 07/05/2017 15:52, [1]Albert-Jan Roskam wrote: From: Python-list on behalf of Maylin

Re: memory leak with re.match

2017-07-05 Thread Albert-Jan Roskam
From: Python-list on behalf of Mayling ge Sent: Tuesday, July 4, 2017 9:01 AM To: python-list Subject: memory leak with re.match      Hi,    My function is in the following way to handle file line by line. There are    multiple error patterns  defined and  need to apply  to each  line. I  us

Re: memory leak with re.match

2017-07-05 Thread Mayling ge
Thanks. I actually comment out all handling code. The loop ends with the re_pat.match and nothing followed. Sent from Mail Master On 07/05/2017 08:31, [1]Cameron Simpson wrote: On 04Jul2017 17:01, Mayling ge wrote: > My function is in the following way to handle file lin

Re: memory leak with re.match

2017-07-04 Thread Cameron Simpson
On 04Jul2017 17:01, Mayling ge wrote: My function is in the following way to handle file line by line. There are multiple error patterns defined and need to apply to each line. I use multiprocessing.Pool to handle the file in block. The memory usage increases to 2G for a 1G file. A

Re: Memory leak involving traceback objects

2009-07-16 Thread Aahz
In article , Rotem wrote: > >I'm debugging a nasty memory leak in a framework written in Python >(v2.6.2). >After much digging around I found that the entire object group that is >leaking is held by a frame object which is subsequently held by a >traceback object. > >Traversing the get_referrers(

Re: Memory leak on python 2.5 if using str(dict(a='a'))

2009-04-28 Thread Gabriel Genellina
En Tue, 28 Apr 2009 05:09:25 -0300, Benjamin Liu escribió: I use guppy-pe to identify this issue in my program. The resources links are all embedded in source code already. How do you know there is actually a memory leak here? Can you show the leak without resorting to guppy? If I understa

Re: Memory Leak after Py_Finalize()

2009-03-27 Thread Gabriel Genellina
En Thu, 26 Mar 2009 14:51:00 -0300, Tom escribió: I have ported Python, numarray and numpy to the PharLap Embedded Operating System. Python 2.5.2 numpy 1.3.0b1 My problem is the massive memory loss coming back after Py_Finalize() when using numpy. I have seen similar posts but am unclear how to

Re: Memory leak problem (while using tkinter)

2008-12-31 Thread Marc 'BlackJack' Rintsch
On Tue, 30 Dec 2008 20:21:06 -0800, André wrote: > I have written a small program (my first Tkinter-based app) to play > around the idea mentioned on > http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona- lisa/ > and, in doing so, have encountered a memory leak problem. I hav

Re: Memory leak when using a C++ module for Python

2008-12-16 Thread Ivan Illarionov
On Dec 11, 8:35 pm, Jaume Bonet wrote: >         //Here we take the info coming from python and transform it > into a vector (will allow us to work with numbers instead of >         // strings) and shareInt which is an array of sets (form > std::set) >         vector translator = string2int > (sh

Re: Memory leak when using a C++ module for Python

2008-12-16 Thread Jaume Bonet
When I tried the C++ function with a C++ main() (skipping the Python part) it didn't show any memory problem, but I'll re-check it anyway, thanks... On Dec 16, 9:16 am, "Gabriel Genellina" wrote: > En Thu, 11 Dec 2008 15:35:58 -0200, Jaume Bonet   > escribió: > > > This is the function that is v

Re: Memory leak when using a C++ module for Python

2008-12-16 Thread Gabriel Genellina
En Thu, 11 Dec 2008 15:35:58 -0200, Jaume Bonet escribió: This is the function that is visible from python and the one that the python code calls: static PyObject * IMFind (PyObject *self, PyObject *args, PyObject *kwargs) { Your function does not call any Python function except PyArg_P

Re: Memory leak when using a C++ module for Python

2008-12-11 Thread Jaume Bonet
Sure, sorry... This is the function that is visible from python and the one that the python code calls: static PyObject * IMFind (PyObject *self, PyObject *args, PyObject *kwargs) { //Array for the detection of the parameters coming from Python static char *kwlist[] = {"shareInt"

Re: Memory leak when using a C++ module for Python

2008-12-11 Thread Ulrich Eckhardt
Jaume Bonet wrote: > When I test the code from C++ each time I delete a vector the consumed > memory decreases, but it does not happen when the module is called > from python. What is a "vector" for you? Do you mean std::vector? A vector allocated using malloc()? A vector allocated using new? Just

Re: memory leak?

2008-12-10 Thread Gabriel Rossetti
Gabriel Rossetti wrote: Terry Reedy wrote: Gabriel Rossetti wrote: I ran these tests on linux 2.6 (ubuntu 8.04) using python 2.5.2. Have you tried the much newer 2.6? 2.5.3 will be out soon with some bug fixes. Thanks for the reply Terry, I just tried the pyserial example with python 2.

Re: memory leak?

2008-12-10 Thread Gabriel Rossetti
Terry Reedy wrote: Gabriel Rossetti wrote: I ran these tests on linux 2.6 (ubuntu 8.04) using python 2.5.2. Have you tried the much newer 2.6? 2.5.3 will be out soon with some bug fixes. Thanks for the reply Terry, I just tried the pyserial example with python 2.6 and it still has the sa

Re: memory leak?

2008-12-09 Thread Terry Reedy
Gabriel Rossetti wrote: I ran these tests on linux 2.6 (ubuntu 8.04) using python 2.5.2. Have you tried the much newer 2.6? 2.5.3 will be out soon with some bug fixes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory Leak

2008-08-27 Thread Kevin McKinley
Kevin McKinley napisał(a): >> that everytime i click a tab or button the amount of memory the program >> takes up goes up by 50-200 kb. The program will start off at 4.5mb and >> by the time i'm done it can get up over 10 or 15 mb. The program will >> start ru

Re: Memory Leak?

2008-08-27 Thread Rob Wolfe
Kevin McKinley napisał(a): > So i've complete my first program with a GUI interface. I've noticed > that everytime i click a tab or button the amount of memory the program > takes up goes up by 50-200 kb. The program will start off at 4.5mb and > by the time i'm done it can get up over 10 or 1

Re: Memory Leak?

2008-08-26 Thread Gabriel Genellina
En Tue, 26 Aug 2008 23:27:45 -0300, Kevin McKinley <[EMAIL PROTECTED]> escribi�: So i've complete my first program with a GUI interface. I've noticed that everytime i click a tab or button the amount of memory the program takes up goes up by 50-200 kb. The program will start off at 4.5mb

Re: Memory leak/gc.get_objects()/Improved gc in version 2.5

2007-10-09 Thread arvind
On Oct 9, 7:54 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On 10/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > I'm running a python program that simulates a wireless network > > protocol for a certain number of "frames" (measure of time). I've > > observed the following: > > > 1

Re: Memory leak/gc.get_objects()/Improved gc in version 2.5

2007-10-09 Thread Chris Mellon
On 10/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm running a python program that simulates a wireless network > protocol for a certain number of "frames" (measure of time). I've > observed the following: > > 1. The memory consumption of the program grows as the number of frames > I sim

Re: Memory leak/gc.get_objects()/Improved gc in version 2.5

2007-10-08 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Questions like this about memory consumption should start with the information printed by the interactive interpreter on startup and additional info about whether the binary is from stock CPython or has 3rd party modules compiled in.

Re: Memory leak when creating lots of object

2007-08-18 Thread Paul Moore
On 17 Aug, 04:51, Godzilla <[EMAIL PROTECTED]> wrote: > On Aug 16, 1:13 am, Paul Moore<[EMAIL PROTECTED]> wrote: > > On 14 Aug, 05:57, Godzilla <[EMAIL PROTECTED]> wrote: > > Do you see memory growth with precisely this code? Over what period? > > How much? > > I have it running for more than 1 ho

Re: Memory leak when creating lots of object

2007-08-17 Thread Terry Reedy
"Godzilla" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | What should I do next? Can I force garbage collection manually? If so, | how do I do that? Read doc for gc module. I think import gc gc.collect() -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory leak when creating lots of object

2007-08-16 Thread Godzilla
On Aug 16, 1:13 am, Paul Moore <[EMAIL PROTECTED]> wrote: > On 14 Aug, 05:57, Godzilla <[EMAIL PROTECTED]> wrote: > > > Hello, > > > I have a program that create and pop an object off a queue, but it is > > experiencing some memory leakage. I have been unable to detect where > > the memory leakage

Re: Memory leak when creating lots of object

2007-08-15 Thread Paul Moore
On 14 Aug, 05:57, Godzilla <[EMAIL PROTECTED]> wrote: > Hello, > > I have a program that create and pop an object off a queue, but it is > experiencing some memory leakage. I have been unable to detect where > the memory leakage occur. The strange thing is when i replace the > object creation with

Re: Memory Leak with Tkinter Canvas (Python 2.5 Win32)

2007-08-03 Thread frikk
On Aug 3, 2:26 am, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "frikk" wrote: > > 1. ... Am I somehow leaving > > objects laying around that aren't being deleted? Is create_rectangle > > not the appropriate function to use?) > > Try calling the canvas's delete method with the old rect

Re: Memory Leak with Tkinter Canvas (Python 2.5 Win32)

2007-08-03 Thread Hendrik van Rooyen
"frikk" wrote: > 1. ... Am I somehow leaving > objects laying around that aren't being deleted? Is create_rectangle > not the appropriate function to use?) Try calling the canvas's delete method with the old rectangle before making a new one. - Hendrik -- http://mail.python.org/mailma

Re: Memory Leak with Tkinter Canvas (Python 2.5 Win32)

2007-08-02 Thread Wojciech Muła
frikk wrote: > [...] > As you can see- I am doing nothing other than drawing a lot of > rectangles on the canvas. You aren't drawing, but **creating** rectangle objects, as a meth. name suggests. You find more info at tkinter.effbot.org. > [...] > > def clear_grid(): canv.delete(ALL)

Re: Memory leak issue with complex data structure

2007-07-05 Thread Hrvoje Niksic
Alan Franzoni <[EMAIL PROTECTED]> writes: > I have a serious "leak" issue; even though I clear all those sets > and I delete all the references I can have to the current namespace, > memory is not freed. Maybe the memory is freed (marked as available for further use by Python), just not released

Re: Memory leak issue with complex data structure

2007-07-04 Thread Josiah Carlson
Alan Franzoni wrote: > I have a root node which is not referenced by any other node. So, I > created a "clear()" method which is called on all children (by calling > their clear() method" and then clears the set with the references of the > node itself. Using the .clear() method on sets (or dictio

Re: Memory leak in PyQt application

2007-07-01 Thread Daniel Nogradi
> Python 2.5.1 > Boost.Python > Qt 4.2.2 > SIP 4.6 > PyQt 4.2 > WinXp > > I've a memory leak in a PyQt application and no idea how to find it. What > happens in the application ? > > From QWindow a QDialog is called on a button "pressed()" signal, that > instantiate a QThread and waits for it. If

Re: Memory leak in PyQt application

2007-06-30 Thread David Boddie
On Thu Jun 28 19:21:36 CEST 2007, Alexander Eisenhuth wrote: > I've a memory leak in a PyQt application and no idea how to find it. What > happens in the application ? > > From QWindow a QDialog is called on a button "pressed()" signal, that > instantiate a QThread and waits for it. If the thr

Re: memory leak

2007-01-28 Thread Gabriel Genellina
At Wednesday 24/1/2007 22:06, john g wrote: i have a memory leak issue with extension function that im working on. it reads data from a binary file into a stl vector then creates a new list to pass back to the python interface. the function works the first 1021 times but then gives a segmentat

Re: memory leak problem with arrays

2006-06-20 Thread sonjaa
Hi Fredrik the array was created by reading in values from a ascii file. also, I've implemented the suggestions, but nothing has worked to date. And yes, I have enough memory for one iteration. The app usually runs out of memory around the 12th iteration. Also, I can send a working version of th

Re: memory-leak in pysqlite 2.3.0 ?

2006-06-19 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Michael Husmann wrote: > After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a > sqlite database increases memory consumption heavily. […] > > Here a short example: > --- > #!/usr/bin/env python > > import os > from pysqlite2 imp

Re: memory leak problem with arrays

2006-06-15 Thread Fredrik Lundh
sonjaa wrote: > "y" is a 500x500 array. a 500x500 array of what ? how did you create the array ? -- http://mail.python.org/mailman/listinfo/python-list

Re: memory leak problem with arrays

2006-06-15 Thread Serge Orlov
sonjaa wrote: > Serge Orlov wrote: > > sonjaa wrote: > > > Serge Orlov wrote: > > > > sonjaa wrote: > > > > > Hi > > > > > > > > > > I'm new to programming in python and I hope that this is the problem. > > > > > > > > > > I've created a cellular automata program in python with the numpy > > > > >

Re: memory leak problem with arrays

2006-06-15 Thread sonjaa
Carl Banks wrote: > sonjaa wrote: > > I've created a cellular automata program in python with the numpy array > > extensions. After each cycle/iteration the memory used to examine and > > change the array as determined by the transition rules is never freed. > > Are you aware that slicing shares m

Re: memory leak problem with arrays

2006-06-15 Thread sonjaa
Fredrik Lundh wrote: > <[EMAIL PROTECTED]> wrote: > > After doing this I see that iterative counters used to collect occurrences > > and nested loop counters (ii & jj) as seen in the code example below > > are the culprits with the worst ones over 1M: > > > > for ii in xrange(0,40)

Re: memory leak problem with arrays

2006-06-15 Thread Carl Banks
sonjaa wrote: > I've created a cellular automata program in python with the numpy array > extensions. After each cycle/iteration the memory used to examine and > change the array as determined by the transition rules is never freed. Are you aware that slicing shares memory? For example, say you d

Re: memory leak problem with arrays

2006-06-15 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote: > After doing this I see that iterative counters used to collect occurrences > and nested loop counters (ii & jj) as seen in the code example below > are the culprits with the worst ones over 1M: > > for ii in xrange(0,40): >for jj in x

Re: memory leak problem with arrays

2006-06-14 Thread sonjaa
Serge Orlov wrote: > sonjaa wrote: > > Serge Orlov wrote: > > > sonjaa wrote: > > > > Hi > > > > > > > > I'm new to programming in python and I hope that this is the problem. > > > > > > > > I've created a cellular automata program in python with the numpy array > > > > extensions. After each cycl

Re: memory leak problem with arrays

2006-06-14 Thread Serge Orlov
sonjaa wrote: > Serge Orlov wrote: > > sonjaa wrote: > > > Hi > > > > > > I'm new to programming in python and I hope that this is the problem. > > > > > > I've created a cellular automata program in python with the numpy array > > > extensions. After each cycle/iteration the memory used to examine

Re: memory leak problem with arrays

2006-06-14 Thread Robert Kern
sonjaa wrote: > Hi > > I'm new to programming in python and I hope that this is the problem. > > I've created a cellular automata program in python with the numpy array > extensions. After each cycle/iteration the memory used to examine and > change the array as determined by the transition rules

Re: memory leak problem with arrays

2006-06-14 Thread John Machin
On 15/06/2006 8:27 AM, sonjaa wrote: > Serge Orlov wrote: >> sonjaa wrote: >>> Hi >>> >>> I'm new to programming in python and I hope that this is the problem. >>> >>> I've created a cellular automata program in python with the numpy array >>> extensions. After each cycle/iteration the memory used

Re: memory leak problem with arrays

2006-06-14 Thread sonjaa
Serge Orlov wrote: > sonjaa wrote: > > Hi > > > > I'm new to programming in python and I hope that this is the problem. > > > > I've created a cellular automata program in python with the numpy array > > extensions. After each cycle/iteration the memory used to examine and > > change the array as

Re: memory leak problem with arrays

2006-06-14 Thread Serge Orlov
sonjaa wrote: > Hi > > I'm new to programming in python and I hope that this is the problem. > > I've created a cellular automata program in python with the numpy array > extensions. After each cycle/iteration the memory used to examine and > change the array as determined by the transition rules i

Re: Memory leak in Python

2006-05-12 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Serge Orlov <[EMAIL PROTECTED]> writes >The next step is to find out what type of objects contributes to the >growth most of all, Shame you aren't on Windows, as Python Memory Validator does all of this. >after that print several object of that type that >didn't

Re: Memory leak in Python

2006-05-11 Thread darshan . purandare
Either of it would do, I am creating a discrete time simulator. -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory leak in Python

2006-05-11 Thread Serge Orlov
[EMAIL PROTECTED] wrote: > I ran simulation for 128 nodes and used the following > > oo = gc.get_objects() > print len(oo) > > on every time step the number of objects are increasing. For 128 nodes > I had 1058177 objects. > > I think I need to revisit the code and remove the referencesbut how

Re: Memory leak in Python

2006-05-11 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Sure, are there any available simulators...since i am modifying some > stuff i thought of creating one of my own. But if you know some > exisiting simlators , those can be of great help to me. http://simpy.sourceforge.net/ -- http://mail.python.org/mailman/listinfo/pyth

Re: Memory leak in Python

2006-05-11 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > Sure, are there any available simulators...since i am modifying some > stuff i thought of creating one of my own. But if you know some > exisiting simlators , those can be of great help to me. Don't know any by name, but I'm sure you can find some on Google

Re: Memory leak in Python

2006-05-10 Thread diffuser78
I ran simulation for 128 nodes and used the following oo = gc.get_objects() print len(oo) on every time step the number of objects are increasing. For 128 nodes I had 1058177 objects. I think I need to revisit the code and remove the referencesbut how to do that. I am still a newbie coder an

Re: Memory leak in Python

2006-05-10 Thread diffuser78
With 1024 nodes it runs fine...but takes around4 hours to run on AMD 3100. -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory leak in Python

2006-05-10 Thread diffuser78
Sure, are there any available simulators...since i am modifying some stuff i thought of creating one of my own. But if you know some exisiting simlators , those can be of great help to me. Thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory leak in Python

2006-05-10 Thread bruno at modulix
[EMAIL PROTECTED] wrote: (top-post corrected) > > bruno at modulix wrote: > >>[EMAIL PROTECTED] wrote: >> >>>I have a python code which is running on a huge data set. After >>>starting the program the computer becomes unstable and gets very >>>diffucult to even open konsole to kill that process.

Re: Memory leak in Python

2006-05-10 Thread Serge Orlov
[EMAIL PROTECTED] wrote: > I am using Ubuntu Linux. > > My program is a simulation program with four classes and it mimics bit > torrent file sharing systems on 2000 nodes. Now, each node has lot of > attributes and my program kinds of tries to keep tab of everything. As > I mentioned its a simulat

Re: Memory leak in Python

2006-05-10 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > My program is a simulation program with four classes and it mimics > bittorrent file sharing systems on 2000 nodes. Wouldn't it be better to use an existing simulator? That way, you won't have to do the stuff you don't want to think about, and focus on the

Re: Memory leak in Python

2006-05-09 Thread Karthik Gurusamy
[EMAIL PROTECTED] wrote: > The amount of data I read in is actually small. > > If you see my algorithm above it deals with 2000 nodes and each node > has ot of attributes. > > When I close the program my computer becomes stable and performs as > usual. I check the performance in Performance monito

Re: Memory leak in Python

2006-05-09 Thread diffuser78
The amount of data I read in is actually small. If you see my algorithm above it deals with 2000 nodes and each node has ot of attributes. When I close the program my computer becomes stable and performs as usual. I check the performance in Performance monitor and using "top" and the total memory

Re: Memory leak in Python

2006-05-09 Thread diffuser78
I am using Ubuntu Linux. My program is a simulation program with four classes and it mimics bit torrent file sharing systems on 2000 nodes. Now, each node has lot of attributes and my program kinds of tries to keep tab of everything. As I mentioned its a simulation program, it starts at time T=0 a

Re: Memory leak in Python

2006-05-09 Thread bruno at modulix
[EMAIL PROTECTED] wrote: > I have a python code which is running on a huge data set. After > starting the program the computer becomes unstable and gets very > diffucult to even open konsole to kill that process. What I am assuming > is that I am running out of memory. > > What should I do to make

Re: Memory leak in Python

2006-05-09 Thread Peter Tillotson
1) Review your design - You say you are processing a large data set, just make sure you are not trying to store 3 versions. If you are missing a design, create a flow chart or something that is true to the code you have produced. You could probably even post the design if you are brave enough. 2)

Re: Memory leak in Python

2006-05-09 Thread Sybren Stuvel
[EMAIL PROTECTED] enlightened us with: > I have a python code which is running on a huge data set. After > starting the program the computer becomes unstable and gets very > diffucult to even open konsole to kill that process. What I am > assuming is that I am running out of memory. Before acting

Re: Memory leak in Python

2006-05-08 Thread diffuser78
Its kinda 65o lines of code...not the best idea to paste the code. [EMAIL PROTECTED] wrote: > Can you paste an example of the code you're using? -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory leak in Python

2006-05-08 Thread vbgunz
how big is the set? 100MB, more? what are you doing with the set? do you have a small example that can prove the set is causing the freeze? I am not the sharpest tool in the shed but it sounds like you might be multiplying your set in/directly either permanently or temporarily on purpose or acciden

Re: Memory leak in Python

2006-05-08 Thread compromise
Can you paste an example of the code you're using? -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory leak in PyImport_ReloadModule - URGENT

2005-08-11 Thread Michael Hudson
[EMAIL PROTECTED] writes: > Having recently upgraded to Python 2.4, I am having a large memory > leak with the following code built with VC++ 6.0: > > PyObject *pName, *pModule; > > Py_Initialize(); > pName = PyString_FromString(argv[1]); > >

Re: Memory leak in python

2005-04-19 Thread Nick Craig-Wood
Abhishek S <[EMAIL PROTECTED]> wrote: > I am seeing that the python application is very slowly > eating up the memory. i need help to indentify it. > > It start with 11MB and keeps growing by 1 MB around > every 30mins. > > #top | grep python > 10351 root 15 0 26584 25M 3896 S

Re: Memory leak in python

2005-04-19 Thread Fredrik Lundh
"Abhishek S" <[EMAIL PROTECTED]> wrote: > I am seeing that the python application is very slowly > eating up the memory. i need help to indentify it. what Python application? > It start with 11MB and keeps growing by 1 MB around > every 30mins. have you checked for growing lists (etc)? --

Re: memory leak

2004-12-21 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Daniel Wheeler <[EMAIL PROTECTED]> writes I'm on a linux platform and looking in proc/pid/status. Using top shows the same problem. OK, If you were on Windows I could give you some detailed advice - but for Linux, better that somebody else does it. Linux is not my

Re: memory leak

2004-12-21 Thread Jean Brouwers
Since you are on Linux, one thing which could be helpful is to lower the virtual memory limit. Before running your program, use the Csh limit command to set the upper limit for vmemory. If there is a leak in your program or in any of the extensions, it will run out of memory earlier. But settin

Re: memory leak

2004-12-21 Thread Daniel Wheeler
I'm on a linux platform and looking in proc/pid/status. Using top shows the same problem. I've actually just found the c routine where the memory is leaking by the painstaking process of taking the difference between memory consumption before and after each python routine. I guess that memory l

Re: memory leak

2004-12-21 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Daniel Wheeler <[EMAIL PROTECTED]> writes However, I would like to understand first if pure python can leak without the reference count increasing? How are you determining that used memory is increasing? Stephen -- Stephen Kellett Object Media Limitedhttp://www

Re: memory leak

2004-12-21 Thread Daniel Wheeler
It's using a number of extension modules: scipy Numeric pysparse These are all c extensions and could all be leaking memory independently of course. However, I would like to understand first if pure python can leak without the reference count increasing? On Dec 21, 2004, at 11:41 AM

Re: memory leak

2004-12-21 Thread Fredrik Lundh
Daniel Wheeler wrote: > Can python leak memory even if the reference count for all the objects is not > increasing? sure. > For example: > > for i in range(N): > print ref_count_all_objects() > do_something() > > and every iteration the ref count is constant but the memory usage