This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Memory leak on OS X
Type: resource usage Stage:
Components: macOS Versions: Python 2.5
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, fiddlerwoaroof, mark.dickinson
Priority: normal Keywords:

Created on 2008-06-30 19:23 by fiddlerwoaroof, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg69016 - (view) Author: Edward Langley (fiddlerwoaroof) Date: 2008-06-30 19:23
On OS X 10.5.3 the default python has a mild memory leak.
sample session:

% python -S
Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
>>> 

<switch terminals>

% leaks Python
Process 2357: 572 nodes malloced for 1031 KB
Process 2357: 1 leak for 16 total leaked bytes.
...
msg69021 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2008-06-30 22:09
I can reproduce this with the Apple-supplied Python, but I'm having 
trouble reproducing it with anything from python.org.  I tried checking 
out revision 54863 and doing

./configure --enable-framework MACOSX_DEPLOYMENT_TARGET=10.3 && make
sudo make altinstall

Then I get:

$ /usr/local/bin/python2.5 -S
Python 2.5.1 (release25-maint:54863, Jun 30 2008, 22:59:07) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin

$ leaks Python
Process 84169: 534 nodes malloced for 1029 KB
Process 84169: 0 leaks for 0 total leaked bytes.

So maybe the leak is the result of something that Apple did?
msg69024 - (view) Author: Edward Langley (fiddlerwoaroof) Date: 2008-06-30 22:47
I think it may be a result of the framework build, I don't have the
problem with either 2.5.2 (debug build) or 2.6b1, both non-framework 
builds.
msg69028 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-06-30 23:24
I assume it was fixed then.
History
Date User Action Args
2022-04-11 14:56:36adminsetgithub: 47495
2008-06-30 23:24:19benjamin.petersonsetstatus: open -> closed
type: performance -> resource usage
resolution: out of date
messages: + msg69028
nosy: + benjamin.peterson
2008-06-30 22:47:23fiddlerwoaroofsetmessages: + msg69024
2008-06-30 22:09:45mark.dickinsonsetnosy: + mark.dickinson
messages: + msg69021
2008-06-30 19:23:56fiddlerwoaroofcreate