It is seen that if user specified explicit large page size is not honoured then heap is allocated from 4K pages.
In the following case:
Required Heap size : 2GB
Explicit 1GB large page reserved in hugetlbfs : 0
Explicit 2MB large page reserved in hugetlbfs : 4096 (8GB)
Since there are no explicit 1G lager pages available so heap is allocated from 4K pages even though 2M pages can accomodate the requested heap size. May be an approach chosen for code pages (JDK-8256155) which falls back to next available size could be used here.