[Patches] PyMem [8/8] - Final words + TODO

Vladimir Marangozov Vladimir.Marangozov@inrialpes.fr
Sun, 30 Apr 2000 21:46:52 +0200 (CEST)


Final words
-----------

Py_Malloc/Realloc/Free + PyMem_XDEL are gone.

Support for Py_Malloc/Realloc/Free is dropped. They were hardly ever used.
For source code compatibility, they are defined as PyMem_Malloc/Realloc/Free
PyMem_XDEL is defined as PyMem_DEL. ANSI C free(NULL) has no effect,
so this should be safe.

The new interfaces are in place. The distribution compiles flawlessly
on my Linux RH 6.2 and AIX 4.1, and passes OK the test suite. I've been
able to change easily the Python mallocs and have tested all existing
malloc permutations:
                         +-----------+-----------+
                         |  malloc1  |  malloc2  |   malloc1/malloc2 are
+------------------------+-----------+-----------+   two different malloc
|  PyCore_MALLOC         |     X     |           |   impementations that
|  PyCore_OBJECT_MALLOC  |     X     |           |   may operate on the same
+------------------------+-----------+-----------|   or on different heaps.
|  PyCore_MALLOC         |           |     X     |
|  PyCore_OBJECT_MALLOC  |           |     X     |   Each one of them can
+------------------------+-----------+-----------|   be std C malloc. Both
|  PyCore_MALLOC         |     X     |           |   are, by default.
|  PyCore_OBJECT_MALLOC  |           |     X     |
+------------------------+-----------+-----------|
|  PyCore_MALLOC         |           |     X     |
|  PyCore_OBJECT_MALLOC  |     X     |           |
+------------------------+-----------+-----------+

TODO topics
-----------

1) Integration of custom malloc libs in the build process.

   For instance, when the core malloc is changed, the link of pgen
   (in Parser) fails because of dependencies. The link of pgen would
   probably need to be deferred for the "link phase" of the distrib,
   after the compile in all subdirectories. Also, there has to be an
   automatic way of adding custom malloc libraries to the link phase
   (for now, this has to be done manually). I can't be bothered with
   this right now, though...

2) Invisible bugs

3) Malloc cleanup omissions or bugs in the distrib (nah, shouldn't be)

4) Write what's missing in the Extending/Embedding docs.

--
       Vladimir MARANGOZOV          | Vladimir.Marangozov@inrialpes.fr
http://sirac.inrialpes.fr/~marangoz | tel:(+33-4)76615277 fax:76615252