Implement support for large page requests with the allocateMappedMemory interface on Linux and FreeBSD. If the MF_HUGE_HINT flag is passed we first try an mmap with the relevant flag. If that fails we fall back to a normal mmap. On some systems (such as Linux with transparent huge pages) it is possible to indicate with madvise that a certain range of memory should use large pages. We do this if supported and the first mmap with the large page flag failed.
Note that only a little test is added since the allocateMappedMemory interface is already well-tested. It seems difficult to reliably test that we got large pages. I am open to suggestions here (maybe with userfaultfd ?).
Prefer static over anon ns:
https://llvm.org/docs/CodingStandards.html#anonymous-namespaces