apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: cvs commit: apr/poll/unix poll.c
Date Fri, 02 Aug 2002 22:50:02 GMT
On Fri, Aug 02, 2002 at 01:58:25PM -0700, Ryan Bloom wrote:
> Huh?  We don't have any logic to tell apr_palloc how to die.  The
> assumption is that if the server runs out of memory, then apr_palloc
> will return NULL, and the code will seg fault.  The exact same
> assumption can be made for malloc and alloca.  There is no logic in
> apr_palloc which should actually cause the seg fault AFAIK, the seg
> fault is expected in the code that calls apr_palloc.

One small clarification that makes it very difficult to create
portable OOM-detection and handling:

Linux will return a non-NULL pointer even when the system is physically
out of memory. You don't get the SEGV until you try to deref that pointer
and the VM finds that there are no more pages to allocate.


View raw message