On 4/23/2011 10:24 AM, bearophile wrote:
dsimcha:
Right. This is exactly the kind of thing TempAlloc was meant to solve.
I think TempAlloc is meant for larger allocations. D-VLAs are meant to allocate
little arrays (like 1 KB or less) on the normal stack very quickly.
Bye,
bearophile
Why would TempAlloc not work for this? It's slightly slower than VLAs,
but the difference is negligible since it's still almost never a
threading bottleneck and you still have to do something with the array
you allocated.