[PD-dev] message passing

Miller Puckette mpuckett at man104-1.ucsd.edu
Mon Jun 10 18:50:38 CEST 2002


Hi all,

I can't think of a better way to do this.  It's too bad it's so cumbersome,
however!

cheers
Miller

On Mon, Jun 10, 2002 at 04:47:58PM +0200, Krzysztof Czaja wrote:
> hi again,
> 
> in order to somehow put an end to this boring thread (who said dev
> list has to be interesting?), let me report my latest findings.
> 
> After performing a number of tests in max 4.0 (also checking the
> few examples in its sdk) I am pretty sure all the simple classes
> in max use a preallocated, fixed-sized output buffer, with no
> special care for reentrancy.  Since this buffer never grows,
> reentrant calls are `safe'.
> 
> Anyway, I finally decided to adopt a slightly mixed scheme
> (because I intend to handle messages of any size).  This is
> a comment snippet from my code:
> 
> Usually a preallocation method is used, except in special cases
> of:  1) reentrant output request, or 2) an output request which
> would cause resizing to more than MAXSIZE (no such limit for
> a 'set' message).  In both special cases, a temporary output
> buffer is allocated.  A separately preallocated output buffer is
> not used, thus avoiding memcpying of the stored message (a small
> performance gain when the preallocation method is chosen).
> Instead, self-invoked 'set' messages are postponed, using an
> auxiliary buffer.
> 
> If you see any serious flaw in this method, please let me know...
> 
> Krzysztof
> 
> 
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.kug.ac.at
> http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-dev




More information about the Pd-dev mailing list