vulkan: STACK_ARRAY tweaks
I was recently asked to use STACK_ARRAY
in a patch and started reflecting on its current state. I came up with a bug fix and a few improvement suggestions. I'm not sure every change here is actually desirable, but I guess an MR is a great way to start the discussion. Feel free to NACK the patches you don't think are worth merging. In summary we have:
- Fix potential leak.
- Don't 0-init everybody.
- Switch to
alloca()
. - Change the threshold to bytes instead of elements
- Make it warn when we forget the finish function.
- Move to
src/util
.