[PD] non-leaky symbols

Bryan Jurish moocow at ling.uni-potsdam.de
Thu Nov 25 02:31:02 CET 2004


moin ix, moin list,

On 24 November 2004 at 00:37:43, ix appears to have written:
 > im wondering how others go about avoiding memory leaks caused by
 > excessive symbol generation.
 >
 > recently, ive found zexy-l2s to be the 'savior' to a lot of
 > problems, such as:
[snip]
 > everything works out but the catch is chew 1 mb RAM a minute or
 > more, just from all the symbols being generated. im not sure i
 > really need all them to stick around in some hash table after
 > theyre handed off to another object or split up anyways..

Personally, I handle these memory leaks by not handling them: I
use symbols pretty heavily in a number of patches (natural language
stuff), I pre-define 30K or so symbols and generate more on the fly,
and I agree that the permanence of symbols is a real difficulty
on a machine with little RAM -- so far, I haven't managed to generate
enough symbols to crash Pd during a performance though ;-)

Johannes and Krzysztof have commented on the specifics of l2s, and
I can only add a hearty "me too" regarding some kind of standardized
list handling primitives, which might help in the individual cases
you're talking about.  Another option (attractive to me) might be
some kind of "temporary symbol" convention -- i.e. a symbol whose
s_name would be changeable, but whose actual t_symbol* component
is permanent -- I suppose such symbols would have to be identified
by a sort of "initial name" to ensure that they get hashed right,
but would have to be set-able in some non-standard fashion (list
of ASCII-valued floats?) in order for them to make any sense
memory-allocation-wise...

... or maybe i just think that sounds like a good idea because it's
nearing 3am here....

marmosets,
	Bryan


 > 
 > _______________________________________________
 > PD-list at iem.at mailing list
 > UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list
 > 




More information about the Pd-list mailing list