Re: GLIB for a webserver



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.  Unwinding the stack to try to find some
memory in C is next to impossible to do correctly once the system has
started to fail.  It is only marginally easier in C++.  Memory is
really a kernel matter rather than a program matter on modern systems.

Furthermore, your server will have ground to a halt well before you
actually get a memory fault and the kernel OOM handler starts killing
off processes.  In most use cases, memory is not the server resource
which is in the most short supply.

Chris



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