[Python-Dev] Memory management in the AST parser & compiler
Neil Schemenauer
nas at arctrix.com
Mon Nov 28 22:46:05 CET 2005
On Mon, Nov 28, 2005 at 03:47:07PM -0500, Jeremy Hylton wrote:
> The reason this thread started was the complaint that reference
> counting in the compiler is really difficult.
I don't think that's exactly right. The problem is that the AST
compiler mixes its own memory management strategy with reference
counting and the result doesn't quite work. The AST compiler mainly
keeps track of memory via containment: for example, if B is an
attribute of A then B gets freed when A gets freed. That works fine
as long as B is never shared. My memory of the problems is a little
fuzzy. Maybe Neal Norwitz can explain it better.
Neil
More information about the Python-Dev
mailing list