|
Boost Users : |
Subject: Re: [Boost-users] [Interprocess] Allocation algorithms
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2013-06-24 15:18:48
El 24/06/2013 1:33, Oodini escribió:
> Hello,
>
> I need to allocate and fill about 10 big memories areas (several Gb) at the startup of my program.
> The data will never be modified or freed after during the program lifetime, and will be *only read* an other processes.
>
> What allocation algorithm should I take from the ones provided by the library ?
> Should I create a new one, more efficient (no reallocations, no race conditions...) ?
Use the default one, but open the managed shared memory as
open_read_only. That will map shared memory with read-only protection
and will avoid using any internal mutexes (as using mutexes on the
shared memory will lead to access violation).
Best,
Ion
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