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

APR is inconsistent about pool behavior

From: Jim Blandy <jimb_at_savonarola.red-bean.com>
Date: 2000-10-09 23:01:38 CEST

return zero if they can't allocate the memory you requested, unless
you register an abort function for them to call instead.

own hash table module assumes that pool allocation always succeeds,
and thus can't handle pools that don't have abort functions
registered.

For the Subversion filesystem library, I'd like to assume that
allocation always succeeds. I could simply make the requirement that
all pools must have an abort function registered, and add a new
Subversion error code, SVN_ERR_POOL_LACKS_ABORT. But this seems kind
of silly, since clearly everyone (well, apr/tables, at least) is
making this same assumption anyway.

I think it would be better to simply specify that the apr allocation
calls always succeed, specify some default behavior when we run out of
memory (the abort () function sounds fine to me), and let people
provide their own abort function if they don't like that.
Received on Sat Oct 21 14:36:10 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.