[Fluxus] pdata-map! memory leak?

David Griffiths dave at pawfal.org
Wed Jan 5 10:21:40 PST 2011


Hi Gabor,

I've been aware of the creating/deleting primitives problem for some
time but I've never managed to track it down. IIRC it looked like some
combination of the garbage collector and fluxus allocating/freeing large
chunks. This looked more like memory fragmentation to me, but I'm still
hoping for a leak as it will be simpler to fix.

This is a new one though, I'll have a look at it.

cheers,

dave

On Wed, 2011-01-05 at 16:52 +0100, gabor papp wrote:
> i've been trying to narrow down the memory leak, which occurs with 
> scripts running for a long time. we surmised that it was connected to 
> constantly destroying and deleting polygon primitives. i could not 
> confirm this, although i might have found some leaking with pdata-map!.
> 
> (clear)
> 
> (define p (build-particles 65536))
> 
> (every-frame
>      (begin
>          (with-primitive p
>              (pdata-map! (lambda (c) 1) "c")
>              (pdata-map!
>                  (lambda (p)
>                      (crndvec))
>                  "p"))
>          (collect-garbage)
>          (dump-memory-stats)))
> 
> this script leaks about 200k memory on my system in 10 minutes. i 
> thought we registered something wrong with the garbage collector when 
> passing data between scheme and c++, but could not found anything, even 
> with the help of the racket list. i'm kind of stuck, posting the script 
> hoping that someone can confirm the leak and/or has some ideas how to 
> fix it.
> 
> best,
> gabor





More information about the Fluxus mailing list