Posted Sep 16, 2011 19:17 UTC (Fri) by bronson (subscriber, #4806)
[Link]
That was painfully true 20 years ago. With modern memory management it doesn't matter much. Within reason of course -- a 20 MB buffer should probably still go on the heap.
code feedback ...
Posted Jan 25, 2012 20:34 UTC (Wed) by droundy (subscriber, #4559)
[Link]
I prefer to avoid putting buffers on the stack simply to reduce the difficulties associated with buffer overflows. Not for security reasons (most of my programming is scientific), but simply so overwriting the buffer won't trash the stack, making debugging harder. And also to allow valgrind to immediately recognize a buffer overwrite...