News for hackers. Stuff that matters.
Re:Memory is slow, Disk is fast – Part 2 by inetknght on Friday September 05, 2025 @01:05PM (#45140880)
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

Re:Memory is slow, Disk is fast – Part 2 by squirrellous on Saturday September 06, 2025 @03:58AM (#45147460)
Cool! 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.