There are some places that says that sizes of the reserved memory needs to be allocation granularity aligned. There's no such requirement. It's the start address that needs to be allocation granularity aligned.
Note, however, that if you reserve consecutive memory areas that the size naturally becomes aligned to the allocation granularity. Maybe that's where these comments / asserts come from?
One example can be found in anon_mmap:
// It must be a multiple of allocation granularity.
Note, however, that if you reserve consecutive memory areas that the size naturally becomes aligned to the allocation granularity. Maybe that's where these comments / asserts come from?
One example can be found in anon_mmap:
// It must be a multiple of allocation granularity.
- duplicates
-
JDK-8253683 Clean up and clarify uses of os::vm_allocation_granularity
-
- Open
-