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

Reply via email to