apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sander Striker <stri...@apache.org>
Subject Re: apr threads priority and default memory pool allocation
Date Fri, 16 Jan 2004 08:16:06 GMT
On Fri, 2004-01-16 at 07:37, Stephen Ince wrote:
> Hi,
>     I am relatively new to the apr. I would like to the know
> the following.
>  
> 1) Is it possible to set the default memory allocation for a sub pool
> or a pool? I looked at the code and I noticed that the minimum size is
> 8k. This seems quite large.
>  
> psuedo code:
>    apr_pool_create(&sub_pool, pool); 
>     // Is the real memory for the sub_pool initialially being
> allocated 8k,

Yes.

>  or does it use the
>     // real memory that is allocated in the parent 'pool'?

No, although we could probably code that up, with the sidenote
that moving a child pool to a different parent is impossible
to implement thereafter.

>  Does it only request memory from
>     // the system if the parent pool requires it.

It only requests memory when the allocator associated with the
pool requires it.  Parent and child pools don't neccessarily share
the same allocator.


Sander

Mime
View raw message