[Python-Dev] Adding pymalloc to 2.1b1 ?! (python-dev summary, 2001-02-01 - 2001-02-15)

Michael Hudson mwh21@cam.ac.uk
15 Feb 2001 23:40:49 +0000


Guido van Rossum <guido@digicool.com> writes:

> > Michael Hudson wrote:
> > > 
> > >  The use
> > >  of Vladimir Marangoz's obmalloc patch in some of the benchmarks
> > >  sparked a discussion about whether this patch should be incorporated
> > >  into Python 2.1.  There was support from many for adding it on an
> > >  opt-in basis, since when nothing has happened...
> > 
> > ... I'm still waiting on BDFL pronouncement on this one. The plan
> > was to check it in for beta1 on an opt-in basis (Vladimir has written
> > the patch this way).
> > 
> > -- 
> > Marc-Andre Lemburg
> 
> If it is truly opt-in (supposedly a configure option?), I'm all for
> it.  

It is very much opt-in.

> I recall vaguely though that Jeremy or Tim thought that the patch
> touches lots of code even when one doesn't opt in.  That was a no-no
> so close before the a2 release.  Anybody who actually looked at the
> code got an opinion on that now?  

I suggest looking at the patch.  Not at the code, but what it does as
a diff:

1) Add a file Objects/obmalloc.c
2) Add stuff to configure.in & config.h to detect the --with-pymalloc
   argument to ./configure
3) Conditionally #include "obmalloc.h" in Objects/object.c if
   WITH_PYMALLOC is #defined
4) Conditionally #define the variables in Include/objimpl.h to #define
   the #defines needed to override the memory imiplementation if
   WITH_PYMALLOC is #defined

And *that's it*.  That's not my definition of "touches a lot of code".

Cheers,
M.

-- 
  Or here's an even simpler indicator of how much C++ sucks: Print
  out the C++ Public Review Document.  Have someone  hold it about
  three feet  above your head and then drop it.  Thus  you will be
  enlightened.                                        -- Thant Tessman