[Python-Dev] survey of extension module memory managment (original) (raw)

Neil Schemenauer nas@python.ca
Mon, 18 Mar 2002 16:46:31 -0800


I randomly grabbed a bunch of extension modules by searching the python.org topic guides and by using Parnassus. I looked at 20 different packages. 12 of them implemented an extension type. 12 of them use the memory management API incorrectly and will break if pymalloc is enabled. That's worse than I thought.

Here is the comment list of packages with extension types:

DB2-Python-0.991

Allocates with PyObject_NEW and deallocates with PyMem_DEL

DCOracle-1.3.1b1

Allocates with PyObject_NEW and deallocates with PyMem_DEL

Kinterbasdb

Allocates with PyObject_NEW and deallocates with PyMem_DEL

MySQL-python-0.3.5

Allocates with PyObject_NEW and deallocates with PyMem_Free

PyGreSQL-3.3-pre011203

Allocates with PyObject_NEW and deallocates with PyMem_DEL

avl-2.0

Allocates with PyObject_NEW and deallocates with PyMem_DEL

crng-1.1

Allocates with PyObject_NEW and deallocates with PyMem_Free

sybase-0.33

Allocates with PyObject_NEW and deallocates with PyMem_DEL

pysdl-0.0.7

Allocates with PyObject_NEW and deallocates with PyMem_DEL

sketch-0.6.13

Allocates with PyObject_NEW and reallocates with realloc,
deallocates with free

pyshout-0.0.6

Allocates with PyObject_NEW and deallocates with PyMem_DEL

pwin

Allocates with PyObject_NEW and deallocates with PyMem_DEL