2 ms·
For some types of applications, it is a doable use case, it is the same as asking how malloc() returning NULL helps.
by pjmlp 2y ago
For some types of applications, it is a doable use case, it is the same as asking how malloc() returning NULL helps.
- roca 2y agomalloc() returning NULL isn't that helpful. Most applications just react to that by aborting, and most applications that don't abort take poorly-tested error-handling paths that often don't work. I don't remember ever seeing an application that reacted by trying the allocation again but requesting less memory. I have seen applications react by pausing and trying the allocation again a few seconds later --- this can be shockingly effective! https://hacks.mozilla.org/2022/11/improving-firefox-stability-with-this-one-weird-trick/ https://hacks.mozilla.org/2022/11/improving-firefox-stabilit...