3 ms·
> Your running program's char x[4096] could go spectacularly wrong. This is a tiny size, and it would never pose a problem. I'm talking about allocating a few
by enriquto 7y ago
> Your running program's char x[4096] could go spectacularly wrong.
This is a tiny size, and it would never pose a problem. I'm talking about allocating a few high-resolution video frames on a VLA for temporary computation. It is extremely natural to declare these temporary space inside a for loop as
for (...)
{
float frame[3*width*height]; // temporary data
...
}
but due to the "unsafety" of the VLA implementation it is not very portable. To make it safe in my linux computer I just set "ulimit -s" to a huge value and it works. But it is not very practical to distribute such code to others.
- kazinator 7y ago> This is a tiny size, and it would never pose a problem. Cribbed from some Unix programmer's epitaph.