Glenn Fowler wrote: > On Mon, 13 Nov 2006 23:37:17 +0100 Roland Mainz wrote: [snip] > >>> no ast code uses dynamic local arrays because it is inherently > >>> non-portable <<< > > instead, for function local storage: > ksh uses the sfio based stak routines
Yes, but those are not thread-safe (yet; another problem we have to re-visit later... ;-( ). > much of the rest of ast uses local or application global sfio string streams > a few isolated spots use vmalloc()/vmfree() > > if/when *real* hotspots (>=1% of time/space) due to these tactics are exposed > we'll examine them and consider alternatives > until then wholesale switchover of burned in and tested methods to a > non-portable > untested (w.r.t. to usage withing ast) method is not worth it > especially so close to a commitment to stable code Well, one idea is to add macros (e.g. |AST_STACK_ALLOC()| and |AST_STACK_FREE()| ; I wrote similar macros for Mozilla.org long ago to improve the string handling in the gfx/ code) which wrap the various methods and use C99 semantics if available and other solutions otherwise. ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;)