The code handling large pages reservation on Windows currently fall back to using normal pages if the alignment is larger than the large page size. For G1 this is a problem if the region size is larger than 2m (on x64 where the large page size is 2m). In those cases the Java heap will not be backed with large pages.
We should change reserve_memory_special on Windows to work similar to Linux where we always ensure the alignment, so that large pages can be used even it the alignment is larger than the page size.
We should change reserve_memory_special on Windows to work similar to Linux where we always ensure the alignment, so that large pages can be used even it the alignment is larger than the page size.