[Patches] [ python-Patches-1123430 ] Python memory allocator: Free memory
SourceForge.net
noreply at sourceforge.net
Thu Mar 16 02:17:30 CET 2006
Patches item #1123430, was opened at 2005-02-15 16:27
Message generated for change (Comment added) made by tim_one
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1123430&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.5
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Evan Jones (vulturex)
Assigned to: Tim Peters (tim_one)
Summary: Python memory allocator: Free memory
Initial Comment:
This is the second version of my Python memory allocator patch.
The first version was discussed on the python-dev mailing list
here:
http://mail.python.org/pipermail/python-dev/2005-January/
051255.html
This patch enables Python to actually return memory to the
system. The current version's memory usage will only grow. This
version maintains the same backwards compatability guarantees
as the previous version: Calling PyObject_Free with a pointer that
was returned by malloc() while NOT holding the GIL will work, and
will not corrupt the state of the memory allocator.
The patch modifies obmalloc.c. If it is accepted, other
modifications to that file are required. In particular, I have not yet
updated the WITH_MEMORY_LIMITS implementation, nor have I
looked closely at the PYMALLOC_DEBUG code to see what changes
(if any) are required.
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2006-03-15 20:17
Message:
Logged In: YES
user_id=31435
The tim-obmalloc branch was merged to the trunk (for Python
2.5a1) in revision 43059. Thank you again for your hard
work and patience, Evan!
----------------------------------------------------------------------
Comment By: Evan Jones (vulturex)
Date: 2006-02-23 09:29
Message:
Logged In: YES
user_id=539295
Great news! If you need any assistance, I would be more than
happy to help.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2006-02-22 20:25
Message:
Logged In: YES
user_id=31435
The patch here is out of date, but that's OK. I created
branch tim-obmalloc, with a working version of the patch,
extensively reformatted to Python's C style, and with some
minor changes to squash compiler warnings. I plan to finish
this during PyCon.
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2005-09-05 18:43
Message:
Logged In: YES
user_id=31435
Assigned to me.
----------------------------------------------------------------------
Comment By: Evan Jones (vulturex)
Date: 2005-05-10 00:31
Message:
Logged In: YES
user_id=539295
Whoops! I uploaded a "fixed" version a while ago, but I guess I didn't
update the comments. The patch currently attached to this is the most up-
to-date version. Sorry about that.
----------------------------------------------------------------------
Comment By: Evan Jones (vulturex)
Date: 2005-02-19 09:07
Message:
Logged In: YES
user_id=539295
As per the discussion on python-dev, I've removed the concurrency hack.
The routines in obmalloc.c now *must* be called while holding the GIL,
even if the pointer was allocated with malloc(). I also finally fixed the
PYMALLOC_DEBUG routines, so I believe this patch is now "complete."
----------------------------------------------------------------------
Comment By: Evan Jones (vulturex)
Date: 2005-02-18 17:08
Message:
Logged In: YES
user_id=539295
Please ignore this patch for the moment: I'm in the process of making
some fixes.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1123430&group_id=5470
More information about the Patches
mailing list