Setting top in MutableNUMASpace can create a hole in chunk, which is less than a minimal object size in the lgrp chunk. The VM would typically fail while trying to fill the hole with a dummy object.
Internal Error at sharedHeap.cpp:279, pid=8687, tid=5
Error: assert(word_size == (size_t)oopDesc::header_size(),"Unaligned?")
Also, if a object crosses the chunk boundary a verification would fail, because it verifies each chunk independently. The failure will look like:
Internal Error at mutableSpace.cpp:130, pid=7099, tid=5
Error: guarantee(p == top(),"end of last object must match end of space")
There is also a fault in the allocation code, that enable creation of less than a minimal object sized holes between the lgrp chunks, which I had introduced while fixing 6697534.
Specifically in MutableNUMASpace::cas_allocate(), the code that computes the size of the hole created should be
size_t remainder = pointer_delta(s->end(), p + size);
instead of
size_t remainder = pointer_delta(s->end(), p);
|