Are you talking about mlock / MAP_LOCKED? mlock forces the file to be in RAM even if nobody else changes the file so that would defeat the purpose of memory mapping (at least in my use case). Or is it some other flag? Doesn't all static data have the same problem we're talking about? Static data is mmaped from the compiled executable file by the operating system. A user might modify the executable file at runtime, thus changing static data that is assumed to not change. But I guess the answer...