[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: return value of apr_palloc

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-08-12 03:27:04 CEST

On Fri, Aug 11, 2000 at 03:04:33PM -0500, Jim Blandy wrote:
> Dumb question, Greg:
> According to _Writing Apache Modules_, one must check the return value
> of ap[r]_palloc. According to the code, it will always return
> non-zero, and APR_ABORT when it runs out of memory.
> Is it kosher for me to assume that if apr_palloc returns, it has
> succeeded?

Absolutely. I'd say "by design" :-)

If any of the ap_palloc(), ap_pcalloc(), etc return, then it succeeded. You
will never see an "out of memory" error.


Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:06 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.