RFR (XS): 8151623: Zap freed Metaspace chunks in non-product binaries
vladimir.x.ivanov at oracle.com
Fri Mar 11 07:55:25 UTC 2016
> Yes, like that.
> The change in the Metachunk constructor changes semantics in that
> the original code mangled the whole chunk, not just the payload. I'd
> prefer that the original code is left. The little bit of code
> duplication is
I think they are equivalent:
_top = initial_top();
size_t data_word_size = pointer_delta(end(), _top, sizeof(MetaWord));
HeapWord* start = (HeapWord*)initial_top();
size_t size = word_size() - overhead();
Copy::fill_to_words(start, size, word_value);
_top == initial_top() and data_word_size == size:
end() == this + _word_size
pointer_delta == (end() - _top) / sizeof(MetaWord)
> Please use the style "word_value" instead of "wordValue".
> If there is a mistake in the mangling of a Metablock, that would
> show up when the Metaspace shrinks. Can you check that the testing
> has some Metaspace shrinking. I think that -Xlog:gc*=trace would
> show the needed output.
Ok, I'll verify that.
More information about the hotspot-dev