RFR (S): 8025228: assert(new_entry->reserved_words() == vs_word_size) fails in nightly
bengt.rutisson at oracle.com
Tue Sep 24 13:49:20 UTC 2013
Good point about the test name. Here is an updated webrev:
On 9/24/13 2:02 PM, Thomas Schatzl wrote:
> On Tue, 2013-09-24 at 13:32 +0200, Bengt Rutisson wrote:
>> Hi everyone,
>> Could I have a couple of reviews for this change?
>> We hit this assert in VirtualSpaceList::get_new_chunk() when we have
>> an allocation that is larger than VirtualSpaceSize and that is not
>> aligned with vm_allocation_granularity. The reason is that the
>> VirtualSpace will grow with sizes aligned to vm_allocation_granularity
>> but we we only guarantee that the sizes we want to grow with are page
>> aligned. This means that we only hit this assert on platforms
>> (Windows) where vm_allocation_granularity > vm_page_size.
>> Since VirtualSpaceSize is vm_allocation_granularity aligned on all
>> platforms we only hit the assert for allocations larger than that size
>> due to this line:
>> 1224 size_t grow_vs_words =
>> 1225 MAX2((size_t)VirtualSpaceSize,
>> The fix is to make sure that the grow_vs_words value is
>> vm_allocation_granularity aligned and not just page size aligned.
> The change looks fine by me, but I am no expert in that area.
>> Added a unit test that fails this way on Windows before my fix:
>> Running internal VM tests
>> Running test: TestReservedSpace_test()
>> Running test: TestReserveMemorySpecial_test()
>> Running test: TestVirtualSpace_test()
>> Running test: MetaspaceAux_test()
> Because it is somewhat fitting to this particular issue, could you
> rename "MetaspaceAux_test" to "TestMetaspaceAux_test" similar to the
More information about the hotspot-gc-dev