It's truly magical. And flags like MAP_LOCKED, MAP_ANONYMOUS, MAP_POPULATE - you can tune it in closer to the behavior you want. That said, if you are concerned about memory consumption, you are ceding control to the kernel. It gets to decide when and whether to evict pages (though you can give hints).