Re:Show HN: Progressbar - A C library for displaying command...
by sherjilozair on Saturday August 29, 2015 @02:28AM
(#10139276)
You can't be further from the truth. A vast magntitude of bugs are due to the system running as if nothing has happened operating on garbage data, and giving you garbage results. If your system is robust to garbage data, say neural network training, good luck finding the bug then.
[ Parent
| on HN ]
Re:Show HN: Progressbar - A C library for displaying command...
by danieltillett on Saturday August 29, 2015 @03:00AM
(#10139333)
But what do you do in practice if you have run out of memory?
Re:Show HN: Progressbar - A C library for displaying command...
by davvid on Saturday August 29, 2015 @03:51AM
(#10139394)
One approach is to free memory, retry, and hope for the best.
Re:Show HN: Progressbar - A C library for displaying command...
by dalke on Saturday August 29, 2015 @04:33AM
(#10139444)
Another is to pre-allocate enough reserve memory to be able to save and exit cleanly. When malloc fails, switch to the reserve memory and either shut down nicely, or post a dire warning to the user that the end is neigh and to "SAVE AND EXIT IMMEDIATELY".