I would like to pre-allocate sufficiently large amount of memory in a program before forking processes and then further allocate/use memory from this pool in the forked processes. I have come across some memory allocators like Bget, Boost etc but not able to understand how to use them.
Is there a simplest one out there which I can use like
poolhandle = poolallocate(pool_size)
Then in forked process use something like
ptr = allocatefromPool(poolhandle,no_of_bytes)
and then if I pass this pointer to another process through some IPC it should be accessible even in that process.
Can you point me in right direction ? If Boost is the way to go can you provide me an example on how to use it ?