24 Jun
2013
24 Jun
'13
7:18 p.m.
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