AW: [PD] freesym

Miller Puckette mpuckett at man104-1.ucsd.edu
Sat Apr 27 22:37:03 CEST 2002


Hi all,

You can never safely delete symbols in Max or Pd since there's no
guaranteed way of tracking down everything that might contain a pointer
to it.  So it's probably not a good idea to rely on generating millions
of symbols in a Pd patch, if you can help it...

cheers
Miller

On Sat, Apr 27, 2002 at 08:13:27PM +0200, Krzysztof Czaja wrote:
> hi Thomas,
> 
> Thomas Grill wrote:
>  > In principle PD handles the lots of symbols quite well (i generated about
>  > 3000000 different ones), but naturally symbol retrieval becomes slow then.
>  > In one occasion PD crashed but this seems to be attributable to Win2K (which
> 
> I am afraid Pd looses any possibility to do audio much sooner than
> 3e+06 figure might suggest.  On an 866Mhz linux, a simple patch using
> [+ 1]<->[int]->`$1-nn' driven by [bang~]->`3'->[until] hits the
> barrier at around 500000-nn symbol, both at first pass, and also
> during retrieval.
> 
>  > Btw. (as i now understand how gensym works...) it seems to be fairly easy to
>  > include a function into pd that frees a symbol. The only difficulty is what
>  > to do with the s_thing pointer attached to a symbol? Free its memory as well
>  > or not?
> 
> This is usually a pointer to an object, and I do not think one is
> supposed to simply ``free memory'' of an object...
> 
> Besides, I would generally be afraid of getting rid of a symbol,
> which is bound to something, because this might indicate the symbol
> is shared.  If symbol was to be freed, I would prefer s_thing
> field to be null in the first place.  But your case may be special
> (and I may be totally wrong here...)
> 
> Krzysztof
> 



More information about the Pd-list mailing list