Question about Boost::Interprocess::Allocators.
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.
On Sun, 8 Mar 2020 at 21:08, Da Xu via Boost-users < boost-users@lists.boost.org> wrote:
... when to use the standard shared memory allocator ...
The answer is in the question. degski -- @systemdeg "We value your privacy, click here!" Sod off! - degski "Anyone who believes that exponential growth can go on forever in a finite world is either a madman or an economist" - Kenneth E. Boulding "Growth for the sake of growth is the ideology of the cancer cell" - Edward P. Abbey
participants (2)
-
Da Xu
-
degski