[Patches] PyMem [1/8] - intro

Vladimir Marangozov Vladimir.Marangozov@inrialpes.fr
Fri, 25 Feb 2000 13:23:09 +0100 (CET)

I'm about to send a couple of patches relative to the malloc cleanup
discussed on python-dev. Since it affects many files in the distribution,
I'll send a patch per directory, which will facilitate their review.

Please examine them carefully. Although I'm pretty confident in their
correctness, some details may have escaped my eyes due to the volume
of the modified code.


Exported (public) interfaces

   - PyMem_{Malloc, Realloc, Free} -- don't call anything on failure
   - Py_{Malloc, Realloc, Free}    -- call PyErr_NoMemory() on failure
   - _PyObject_{New, NewVar, Del}  -- object constructors/destructor

   - PyMem_{NEW, NEW_VAR, DEL}     -- handy, use PyMem_{Malloc...} above
   - PyObject_{NEW, NEW_VAR, DEL}  -- handy, use _PyObject_{New...} above

Private core interfaces

   In addition to the public ones:

   - PyMem_{MALLOC, REALLOC, FREE} -- Python core allocator
   - PyMem_{NEW, NEW_VAR, DEL}     -- handy, use PyMem_{MALLOC...} above
   - PyObject_DEL is inlined (PyMem_FREE)

I'll comment further on every submission.

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