[Python-Dev] Activating pymalloc (original) (raw)
M.-A. Lemburg mal@lemburg.com
Fri, 15 Mar 2002 10🔞39 +0100
- Previous message: [Python-Dev] Activating pymalloc
- Next message: [Python-Dev] Activating pymalloc
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Martin v. Loewis" wrote:
> > A lot of extensions will break. The example code in xxmodule.c was > > "wrong" for years. > > Ditto Zope (as Guido said), ditto Marc-Andre's extensions, ditto NumPy > (IIRC), yadda yadda yadda. I don't know whether MarkH has tried the massive > Win32 extensions with pymalloc yet. I wonder whether one could design a script that analyses Python code for asymmetric usage of memory management functions, e.g. trying to match expression->FIELD = ALLOCATOR; DEALLOCATOR(otherexpression->FIELD); This would complain if there is a FIELD that has no symmetric usage, or if a certain allocator has no counterpart at all in a source file. I then wonder if that script would have found the errors you cite.
I think better would be to add some instrumentation to the interpreter so that extension authors can easily debug the memory and object allocation management in their extensions.
I am thinking of a configure option which enables python -d to generate a log file with all uses of these functions and macros logged to that file.
-- Marc-Andre Lemburg CEO eGenix.com Software GmbH
Company & Consulting: http://www.egenix.com/ Python Software: http://www.egenix.com/files/python/
- Previous message: [Python-Dev] Activating pymalloc
- Next message: [Python-Dev] Activating pymalloc
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]