Issue536909
Created on 2002年03月29日 21:11 by nascheme, last changed 2022年04月10日 16:05 by admin. This issue is now closed.
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:10 | admin | set | github: 36358 |
2002年03月29日 21:11:23 | nascheme | create |