Re: GLIB for a webserver



On Fri, 9 Dec 2011, Chris Vine wrote:

On Thu, 8 Dec 2011 11:13:41 -0200
Marcelo Elias Del Valle - SYSMAP SOLUTIONS - Claro MA-SP -
<Marcelo Valle claro com br> wrote:
- In some forums, people were complaining about the fact glib aborts
when memory allocation fails, which is bad for a 24/7 running web
server.

This particular criticism has little going for it.  Modern operating
systems use swap and memory over-commit, and there is pretty well
nothing you can do once memory is exhausted, particularly if you are a
long way up the call stack. [...]

But still, a sane (or sanely configured) OS can tell when it receives a huge request for memory that it definitely cannot honor. In that case -- where memory is not currently exhausted -- it's much preferable if the app can report "Can't do it" to the user rather than aborting.

Allin Cottrell




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]