RFR(xs): 8065788: os::reserve_memory() on Windows should not assert that allocation size is aligned to OS allocation granularity.
Markus Grönlund
markus.gronlund at oracle.com
Tue Nov 25 10:21:46 UTC 2014
Hi Thomas,
Thanks for finding and addressing this - looks good.
Cheers
Markus
-----Original Message-----
From: Thomas Stüfe [mailto:thomas.stuefe at gmail.com]
Sent: den 24 november 2014 18:32
To: HotSpot Open Source Developers
Subject: RFR(xs): 8065788: os::reserve_memory() on Windows should not assert that allocation size is aligned to OS allocation granularity.
Hi,
a very small change:
Bug Report: https://bugs.openjdk.java.net/browse/JDK-8065788
WebRev: http://cr.openjdk.java.net/~simonis/webrevs/8065788/
os::reserve_memory() on Windows asserts that allocation size is allocated to os::vm_allocation_granularity(). This assert is wrong and should be removed.
Allocation granularity affects the alignment of attach addresses, not of the allocated size. The latter is aligned to page size, but asserting that would be unnecessarily strict, as VirtualAlloc() will just quietly align size up to page size.
For details see MSDN on VirtualAlloc():
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366887%28v=vs.85%29.aspx
Kind Regards,
Thomas Stüfe
More information about the hotspot-dev
mailing list