[Python-bugs-list] [ python-Bugs-678352 ] list.append memory leak ?
SourceForge.net
noreply@sourceforge.net
Sat, 01 Feb 2003 19:27:37 -0800
Bugs item #678352, was opened at 2003-01-31 15:18
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=678352&group_id=5470
Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: thanos vassilakis (thanos)
Assigned to: Nobody/Anonymous (nobody)
Summary: list.append memory leak ?
Initial Comment:
# this SEEMS to leak
l = xrange(10000)
while 1:
a=[]
map(a.append, l)
del a
# this does not
while 1:
a=range(10000)
del a
----------------------------------------------------------------------
>Comment By: thanos vassilakis (thanos)
Date: 2003-02-01 22:27
Message:
Logged In: YES
user_id=91277
Good idea
I will try it out on my OSX mac tomorrow (after upgrading !)
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2003-02-01 20:49
Message:
Logged In: YES
user_id=33168
Was the python version 2.2 or 2.2.2? If you are using 2.2,
you should probably try to upgrade to 2.2.2 since there have
been many bug fixes.
----------------------------------------------------------------------
Comment By: thanos vassilakis (thanos)
Date: 2003-01-31 22:07
Message:
Logged In: YES
user_id=91277
We use HP UX 11 and BSD 4.7 but what were the origial build compilers and libraries will have to wait till Monday - when I will be back at work and have access to the NYSE trading floor systems.
I am chasing some memory leak that occurred when we moved from python 1.5.2 to 2.2
I don't think this is it, but...
Thanks for your quick response.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2003-01-31 20:40
Message:
Logged In: YES
user_id=31435
Again, please identify the Python version and
OS+compiler+C library in use. I'm not arguing with you, I'm
trying to help <wink>. Since I don't see any evidence of
anything like I leak when I try it (memory usage didn't
increase *at all* when I tried it) , the answer to why you see
it must lie in something you're using that I'm not -- only you
can tell us what that might be. I already told you the
Python version, OS and C compiler/library version I used.
----------------------------------------------------------------------
Comment By: thanos vassilakis (thanos)
Date: 2003-01-31 17:47
Message:
Logged In: YES
user_id=91277
HP UX B.11.00
BSD 4.7
python 2.2
Its possible it is not a bug that is why I used the word SEEMS
but why does the second code fragment behave?
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2003-01-31 16:00
Message:
Logged In: YES
user_id=31435
Please identify the Python version and OS+compiler+C
library in use. The process size remains steady for me under
current CVS Python on Win2K w/ MSVC6.
A true leak is possible but unlikely. More likely is that your
platform C malloc()/free() decide not to return memory to the
OS. If so, that's outside of Python's control
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=678352&group_id=5470