[Python-Dev] Memory management in the AST parser & compiler

Neal Norwitz nnorwitz at gmail.com
Tue Nov 15 22:57:05 CET 2005


On 11/15/05, Jeremy Hylton <jeremy at alum.mit.edu> wrote:
>
> Thanks for the message.  I was going to suggest the same thing.  I
> think it's primarily a question of how to add an arena layer.  The AST
> phase has a mixture of malloc/free and Python object allocation.  It
> should be straightforward to change the malloc/free code to use an
> arena API.  We'd probably need a separate mechanism to associate a set
> of PyObject* with the arena and have those DECREFed.

Well good.  It seems we all agree there is a problem and on the
general solution.  I haven't thought about Brett's idea to see if it
could work or not.  It would be great if we had someone start working
to improve the situation.  It could well be that we live with the
current code for 2.5, but it would be great to use arenas for 2.6 at
least.

Niko, Marek, how would you like to lose your lurker status? ;-)

n


More information about the Python-Dev mailing list