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.

-aaron

Reply via email to