When large pages are enabled, the VM tries to use at least one page for all code cache segments which fails if there is not enough space:
$ java -XX:+UseLargePages -XX:+SegmentedCodeCache -XX:InitialCodeCacheSize=2g -XX:ReservedCodeCacheSize=2g -XX:LargePageSizeInBytes=1g -Xlog:pagesize*=debug -version
[0.000s][debug][pagesize] Large Page sizes: 2M, 1G
[0.000s][info ][pagesize] Overriding default large page size (2M) using LargePageSizeInBytes: 1G
[0.001s][info ][pagesize] Usable page sizes: 4k, 2M, 1G
[0.003s][debug][pagesize] Commit special mapping: 0x00007fefc0000000, size=2G, page size=1G
[0.003s][info ][pagesize] CodeHeap 'non-nmethods': min=1G max=6M base=0x00007fefffc00000 page_size=1G size=6M
Error occurred during initialization of VM
Could not reserve enough space in CodeHeap 'non-nmethods' (6144K)
We should not exit them VM but fall back to a smaller page size for the failing segment.
Thanks to Scott Oaks for reporting.