LWN.net Logo

code feedback ...

code feedback ...

Posted Sep 16, 2011 19:17 UTC (Fri) by bronson (subscriber, #4806)
In reply to: code feedback ... by renox
Parent article: Ensuring data reaches disk

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.


(Log in to post comments)

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...

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds