Hi,
I am working on a project, where the requirement is to share
memory between processes. I have been reading at the boost::pool documentation.
But unfortunately I suspect that I can’t use it very
easily.
Basically, what I want to do is pre-allocate a large fixed
size memory segment using mmap, and hand that memory over to pool. The pool
should allocate memory from this segment. However I can’t find such an
interface for pool.
I know that you can write a UserAllocator, but, I can not
write one for shared memory. Dynamic nature of UserAllocator would mean
maintaining free block myself, which is precisely what I wanted to avoid at the
first place.
Is it possible to use the pool interface to achieve this?
If yes how? If not, can you suggest an alternate package or something?
Or, Am I missing something? Please help.
Regards,
-Shriram