RFR (XS): 8151623: Zap freed Metaspace chunks in non-product binaries
jon.masamitsu at oracle.com
Fri Mar 11 17:02:34 UTC 2016
On 3/10/2016 11:55 PM, Vladimir Ivanov wrote:
>> 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)
You're right. I stand corrected.
>> Please use the style "word_value" instead of "wordValue".
> Will fix.
>> 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.
> Best regards,
> Vladimir Ivanov
More information about the hotspot-dev