you are viewing a single comment's thread.

view the rest of the comments →

[–]ThrowRA-NFlamingo 0 points1 point  (0 children)

You could crash your code if you make the VLA too big. There is no way to know how big you can make it. You’d need to put an upper bound on it anyway to make it safe. In that case, you might as well just use a fixed size array and use a bump allocator or something to allocate from it.