<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div id="ydp95836d70yahoo_quoted_7714649765" class="ydp95836d70yahoo_quoted"><div>> then alloca() is IMO the best tool for the job. It is not only
      simpler but also faster than pre-allocation, because the stack
      memory is much more likely to be in cache.</div><div><br></div><div dir="ltr" data-setdir="false">I'm not sure that's quite constrained enough yet. Not only do we want to avoid an arbitrary user-controlled upper bound, we don't want future devs adding the "feature" of an arbitrary user-controlled upper bound, or even a new upper bound that isn't user-controlled but is still too high given what you and I know about alloca.<br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">So unless those constraints are documented in the code, this is still asking for trouble. And history of trouble is scattered throughout the usage history of alloca in Pd and elsewhere.</div><br><div dir="ltr" data-setdir="false">I'm willing to concede that "Don't use alloca," is a bit like, "eval is evil." But given the proliferation of wrong uses of alloca I believe it's warranted. At least here we've gone from avoiding a call to free to a list of very niche constraints.<br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Best,<br></div><div dir="ltr" data-setdir="false">Jonathan</div></div></div></body></html>