[Python-Dev] Re: Activating pymalloc

Vladimir Marangozov vladimir.marangozov@optimay.com
Mon, 18 Mar 2002 17:43:02 +0100


[Neil]
> 
> Vladimir Marangozov wrote:
> > [Neil]
> > > Alternatively, we can expose a new object malloc API that is
> > > documented not to be thread safe and that may not use the system
> > > malloc() and free().
> > 
> > This doesn't repair broken extensions.  Under the second suggestion,
> > all APIs would be malloc/free, and you'll introduce yet another one,
> > just to find out after some time that people will mix this new API
> > with the others just as well...
> 
> No, the new APIs would default to using pymalloc.  "Broken" extensions
> would still work because the old APIs would always use the malloc().

Which is what I said: "broken" extensions remain "broken", but work.
They will never use pymalloc, unless they're fixed. There's a new API
pointing to pymalloc, and you hope that people won't mix it again.
And, this implies that the whole Python core is changed to use pymalloc
explicitly through this API, otherwise the benefits of pymalloc's
introduction are none. Fine by me, if everybody fully understands this
and agrees with it.

Vladimir