3 ms·
My bad, don't use `MAP_HUGETLB`, just use `MAP_HUGE_1GB`. See a quick example I whipped up here: https://github.com/inetknght/mmap-hugetlb https://github.com/i
by inetknght 1y ago
My bad, don't use `MAP_HUGETLB`, just use `MAP_HUGE_1GB`.
See a quick example I whipped up here: https://github.com/inetknght/mmap-hugetlb https://github.com/inetknght/mmap-hugetlb
- squirrellous 1y agoCool! Thanks for the example. The aforementioned work thing requires MAP_SHARED as well which IIRC is the reason it would fail when used together with files and huge pages, but private mappings work as you show.