Cool. Original author here. AMA.
replies(5):
But the arm64 systems with 16K or 64K native pages would have fewer faults.
Pass these flags to your mmap call: (MAP_HUGETLB | MAP_HUGE_1GB)
And, you can poke around in the linux kernel's source code to determine how it works. I had a related issue that I ended up digging around to find the answer to: what happens if you use mremap() to expand the mapping and it fails; is the old mapping still valid or not? Answer: it's still valid. I found that it was actually fairly easy to read linux kernel C code, compared to a lot (!) of other C libraries I've tried to understand.