News for hackers. Stuff that matters.
Re:Please grow your buffers exponentially by Sir_Cmpwn on Tuesday November 04, 2014 @12:49PM (#8557912)
I just addressed this the other day, when a pull request wanted to use exponential growth in the buffer. I told them not to. The difference is that this software is going to run on an embedded sytsem for which I wrote the kernel, and I wrote the realloc function for. My realloc expands the block instead of moving data when possible, and I know that that's a likely scenario during normal operation. On top of that, there's only 32K of memory to go around, so wasting space on exponential growth is a bad idea.

Always be willing to question the standard doctrine.

Re:Please grow your buffers exponentially by beagle3 on Tuesday November 04, 2014 @04:39PM (#8559199)
There's only 32K of memory to go around, and you're doing dynamic memory allocation? It's been 20 years or so since I last touched such a limited memory system - and everyone I know who did switched to static allocations after being bitten by the unpredictability of dynamic allocations.
Re:Please grow your buffers exponentially by Sir_Cmpwn on Tuesday November 04, 2014 @04:46PM (#8559245)
Going on 4 years and it's working out well so far.