Even if not allocating physical memory, reservation of 16GB might have an impact on the number of memory descriptors (pgd, pmd, pte ?) allocated by the kernel.
Go's memory management, ulimit -v, and RSS control
Posted Sep 27, 2011 17:14 UTC (Tue) by Blaisorblade (guest, #25465)
[Link]
PGD, PMD and PTE are part of page tables, and they won't be allocated by a simple mmap. The kernel will record the mmap with a single VMA (a structure representing an mmap), which is small. My only concern is that if you do actual allocations (i.e. change protections) a page at a time, you'll get a VMA for each page, and that consumes memory and slows down page faults for that program. A good memory manager will allocate memory from the OS in bigger chunks, and I hope/guess that Go's memory manager is good enough to do this.