> I'd have look into that. Off the top of my head I don't know how you'd make that happen.
Pass these flags to your mmap call: (MAP_HUGETLB | MAP_HUGE_1GB)
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.