apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tyler MacDonald <ty...@yi.org>
Subject Re: Thread pool prototype
Date Thu, 04 May 2006 03:51:59 GMT
Bojan Smojver <bojan@rexursive.com> wrote:
> Basically, mysql_stmt_init() can return NULL here, which means that  
> from *its* perspective, there is no more memory available. Do we trust  
> foreign APIs then and just let things segfault (i.e. drop the "if  
> ((*statement)->stmt)"), or do we attempt to recover?

	Well if there's no statement handle to clean up, we shouldn't try to
register a cleanup event for it. The APR pool may have some memory available
that we can still use. As for the return value (CR_OUT_OF_MEMORY), if that's
not supported by APR, maybe it would be good to downgrade it to a more
general error code?

	Cheers,
		Tyler

Mime
View raw message