RFR(xs): 8065788: os::reserve_memory() on Windows should not assert that allocation size is aligned to OS allocation granularity.
Thomas Stüfe
thomas.stuefe at gmail.com
Wed Nov 26 11:50:29 UTC 2014
Thank you Markus!
Could I have another Reviewer, and maybe someone who sponsors the change?
Please note that this bug is not purely theoretical, but prevents us from
reserving just one page on windows, which then leads to everyone aligning
the reserve size up to vm_allocation_granularity() just to make the assert
go away. Actually, I see a lot of "align_size_up()"s with
vm_allocation_granularity() which may be unnecessary and could probably get
cleaned up.
Kind Regards, Thomas
On Tue, Nov 25, 2014 at 11:21 AM, Markus Grönlund <
markus.gronlund at oracle.com> wrote:
> 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