[Fluxus] Memory leak in build-extrusion?

David Griffiths dave at pawfal.org
Sat Sep 25 22:54:59 PDT 2010


On Mon, 2010-09-20 at 18:08 +0100, evan.raskob [lists] wrote:
> Hi guys
> 
> I have an exhibition running all day (12+ hrs) and it slows to a crawl towards the end of the day, but all I am doing really is creating an extrusion, destroying it, and re-creating it.  Does this sound plausible? I'm not sure how to profile it...

Yes this is plausable. I saw a similar issue running plant eyes in an
installation, but had trouble narrowing it down as there is so much
going on in that game.

One problem is that it doesn't seem like it's a memory leak (or if there
is one, there is more to it than that), as I tried lots of valgrinding
and fixed a few things but nothing obviously bad, and nothing that
stopped the slowdown. 

The major difference with our scripts using extrusion and other fluxus
scripts (which have run for weeks without problem) is the fact they are
constantly destroying and deleting quite large polygon primitives. 

I'm still not ruling out a leak, but another possibility is memory
fragmentation - as fluxus is allocating tiny bits of memory alongside
these larger chunks for the extrusion poly prims.

This is a bit harder to fix, one possibility is allocating a large
static chunk of memory to use for new primitives which is recycled
internally. Another possibly simpler approach is to do this in the
scheme code - and call (build-polygons) a fixed number of times at start
up and recycle the same ones (assuming they don't change in size).

cheers,

dave




More information about the Fluxus mailing list