3 ms·
80% percent of code writers probably never heard mmap, and might less than 1% ever use that.
by mayli 4y ago
80% percent of code writers probably never heard mmap, and might less than 1% ever use that.
- wyldfire 4y agoIt'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).
- gaudat 4y agoqBittorrent builds using libtorrent 2.0 turned into an absolute memory hog because it used mmap. I assume it is the page table backing the hundred of GBs of memory mapped files. I remember seeing a joke issue asking the author to update the system requirements to be hundreds of GBs of RAM.