title: Linux memory mapping a file with HUGETBL
body: <p>I'm interested in using a memory mapped file for fast I/O, ive done this a few times before without issue.
  I think I'm also hitting a page boundary overhead anytime I access memory past 4k ( I'm streaming data into this memory map ).
  So I was thinking I can use huge pages to get to 2MB page sizes for efficiency here and avoid the small page size overhead and penalties.
  When I try to allocate my memory mapped file with HUGETLB though, mmap fails with an invalid argument error.
  So my basic question is, are hugetable pages supported with memory mapped files?</p>
  
  <p>mmap call for reference, memsize is a multiple of 2M. mmapfd is a file descriptor to the file.
  Note that this call works fine if i dont set MAP_HUGETLB</p>
  
  <p><code>m_mmap = mmap( nullptr, memsize, PROT_READ | PROT_WRITE, MAP_SHARED| MAP_HUGETLB, mmapfd, 0 )</code></p>