4 ms·
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 yo
by sherjilozair 11y ago
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.
- danieltillett 11y agoBut what do you do in practice if you have run out of memory?
- davvid 11y agoOne approach is to free memory, retry, and hope for the best. e.g. https://github.com/git/git/blob/master/wrapper.c#L63 https://github.com/git/git/blob/master/wrapper.c#L63
- dalke 11y agoAnother 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".