Hacker News new | ask | show | jobs
by inetknght 284 days 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

2 comments

Adding MAP_HUGE_1GB and not MAP_HUGETLB does compile and run for me. Not convinced that its' actually doing anything. Performance is the same.
Well now that it works, feel free to start poking around at it for a follow-up blog post :)
The mmap man page kind of implies that would be a no-op, but i haven't tested myself.