[Python-Dev] Activating pymalloc

Martin v. Loewis martin@v.loewis.de
15 Mar 2002 21:23:14 +0100


Tim Peters <tim.one@comcast.net> writes:

> In the other direction, e.g.,
> 
>    PyObject_New ->
>    _PyObject_New ->
>    PyObject_MALLOC ->
>    PyCore_OBJECT_MALLOC ->
>    PyCore_OBJECT_MALLOC_FUNC,
>        and we're back in the macro chain traced above
> 
> There's just no sane way to say "give me obmalloc.c's malloc".

I may be missing something, but won't PyObject_Malloc (or
PyObject_MALLOC if you prefer macros) have precisely this effect?

It's the object allocator you are then talking to (and I withdraw my
earlier claim that nobody wants to call this directly).

Regards,
Martin