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
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
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
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
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
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(
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
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
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
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
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
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
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"
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
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.
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
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
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
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
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
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
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
<[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.
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
"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
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
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
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
"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
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)
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
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
> 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
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
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
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
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
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
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
> > > > >
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
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)
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
<[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
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
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
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
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
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
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
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
Either of it would do, I am creating a discrete time simulator.
--
http://mail.python.org/mailman/listinfo/python-list
[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
[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
[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
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
With 1024 nodes it runs fine...but takes around4 hours to run on AMD
3100.
--
http://mail.python.org/mailman/listinfo/python-list
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
[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.
[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
[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
[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
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
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
[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
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)
[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
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
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
Can you paste an example of the code you're using?
--
http://mail.python.org/mailman/listinfo/python-list
[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]);
>
>
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
"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)?
--
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
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
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
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
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
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
78 matches
Mail list logo