|
Boost Users : |
From: Da Xu (djsignal7_at_[hidden])
Date: 2020-03-09 03:08:11
Hi folks,
I got a question about the boost::interprocess::allocators. I am a little confused as to when to use the standard shared memory allocator, and when to use node_allocator, or any of the other ones.Â
What's the advantage and disadvantage of each? I read through the documentation, but it's not making a whole lot of sense.Â
I am mainly using the allocators with the spsc_queue to transfer objects around, which may contain vectors floats or strings.Â
One thing also confused me a little is that the non-standard shared memory allocators are all marked as not thread safe? I am not sure what does this mean. I assume these allocators will be interprocess safe? As in, I don't need to lock the shared memory to allocate memory, right? Maybe it means I can't share these allocators between threads in the same process?
Any thoughts/tips would be greatly appreciated.
Thank you.
Da.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net