[Fluxus] pdata-map! memory leak?

gabor papp gabor.lists at mndl.hu
Wed Jan 5 07:52:14 PST 2011


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