ASU - out of memory?
dhasenan at gmail.com
Fri Aug 22 17:53:25 CEST 2008
2008/8/22 Tilman Baumann <tilman at baumann.name>:
> I don't care for the warm and fuzzy feeling you get by having malloc
> fail on you.
> It does not give you a bit more system stability! The one app
> receiving malloc errors is just not app of many. They all have a
> problem then.
> Imagine, the browser catches a failed malloc, because some other
> stupid app has eaten almost all ram.
> What is the benefit of telling the browser about low mem? It could
> only safe itself from crashing. Well done.
Imagine that malloc() returns null rather than overcommitting.
Most affected apps will receive a SIGSEGV when malloc returns null
because there's no error handling for that situation.
Some will notice that malloc() returned null and either forgo some
optional stuff or abort a single operation or simply just shut down
Imagine that malloc() returns an invalid pointer when it overcommits.
All affected apps will receive a SIGSEGV in this case, without some
unusual error checking.
More information about the community