homepage

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: pymalloc for types and other cleanups
Type: Stage:
Components: Interpreter Core Versions: Python 2.3
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: nascheme Nosy List: loewis, nascheme, tim.peters
Priority: normal Keywords: patch

Created on 2002年03月29日 21:11 by nascheme, last changed 2022年04月10日 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
type_pymalloc.diff nascheme, 2002年03月29日 21:11
Messages (4)
msg39437 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2002年03月29日 21:11
This patch changes typeobject to use pymalloc for
managing the memory of subclassable types. It also
fixes a bug that caused an interpreter built without
GC to crash.
Testing this patch was a bitch. There are three knobs
related to MM now (with-cycle-gc, with-pymalloc,
and PYMALLOC_DEBUG). I think I found different bugs
when testing with each possible combination.
There's one bit of ugliness in this patch. Extension
module writers have to use _PyMalloc_Del to initialize
the tp_free pointer. There should be a "public"
function for that.
msg39438 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002年03月29日 22:47
Logged In: YES 
user_id=21627
I see another memory allocation family here: What function
should objects allocated through PyType_GenericAlloc be
released with?
If you change the behaviour of PyType_GenericAlloc, all
types in extensions written for 2.2 that use
PyType_GenericAlloc will break, since they will still have
PyObject_Del in their tp_free slot.
I believe "families" should always be complete, so along
with PyType_GenericAlloc goes PyType_GenericFree.
If you want it fully backwards compatible, you need to
introduce PyType_PyMallocAlloc...
msg39439 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2002年03月29日 23:09
Logged In: YES 
user_id=35752
I'm counting on Tim to finish PyMem_NukeIt.
msg39440 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2002年03月31日 07:11
Logged In: YES 
user_id=31435
Neil, I appreciate the work! I'm afraid I screwed you at 
the same time. How do you want to proceed? I think "the 
plan" now is that we go back to the PyObject_XXX interface, 
and when pymalloc is enabled map most flavors of "free 
memory" ({Py{Mem, Object}_{Del, DEL, Free, FREE}) to the 
pymalloc free. You're not required <wink> to work on this, 
but if you've got some spare energy I could sure use the 
help.
History
Date User Action Args
2022年04月10日 16:05:10adminsetgithub: 36358
2002年03月29日 21:11:23naschemecreate

AltStyle によって変換されたページ (->オリジナル) /