apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Sharenkov" <Konstantin.Sharen...@enterra-inc.com>
Subject RE: Memory allocation checks. Veri big impact to stablility
Date Fri, 24 Mar 2006 11:39:33 GMT
>>On 3/23/06, Konstantin Sharenkov <Konstantin.Sharenkov@enterra-inc.com> wrote:
>> If I understand everything correctly the function apr_palloc and apr_pcalloc
>> can return NULL as result if there is no more memory available.

>if no abort function is registered

>> These functions are widely being used within library but a lot of times
>> result of these functions not being checked

>when creating the pool, specify an abort function; see doc for

The shortage of memory should be expected by any real stable server I think.
So my server will need continue to work, just some of requests not will be handled (error
should be returned to client)

What you offer to do with abort_fn except terminate application.
In C++ environment I can throw exception ant this behaviouк will solve my problem. But what
I need to do in C environment with multiple threads? 

Use setjmp/longjmp before each apr call? 
I think it is not solution.



View raw message