Problem with talloc's pool
Jeremy Allison
jra at samba.org
Mon Mar 16 17:54:47 MDT 2015
On Sun, Mar 15, 2015 at 07:08:31PM +0100, artur.miguel wrote:
> Hi,
>
> I am a new user of talloc and I am particularly interested in using
> talloc's pool. However, in the following code:
>
> #include <stdlib.h>
> #include <stdio.h>
>
> #include <talloc.h>
>
> struct foo{
>
> char *name;
>
> };
>
> int main(){
>
> TALLOC_CTX *mem_ctx = talloc_new(NULL);
> TALLOC_CTX *pool_ctx = talloc_pool(NULL, 1024*1024);
>
> if(!pool_ctx) printf("Error allocating pool\n");
> }
>
>
> I can't increase the size of the pool to more than 100*1024*1024. However,
> I want to create a pool of 60+GB of RAM. How can I do this?
Inside libtalloc we have:
#define MAX_TALLOC_SIZE 0x10000000
If you need bigger (not recommended)
you'll have to change that and recompile
a custom talloc library.
More information about the samba-technical
mailing list