16 Oct
2013
16 Oct
'13
9:11 a.m.
I need to read huge amounts of data (for instance, a 20GB file), and since memory mapping is quite fast, I was going to use it.
Illusion. The first time you'll use your data elements, you'll face a "soft" page defaults. If your code has an initialization process to map the shared memory, I advise you to read some elements of the data (use a lopp to read one element on ? elements). So when you'll use your data when you'll really need it, it will be faster.