A ResourceMark is missing in when log.debug_stream() is created:
void CompactibleFreeListSpace::reportFreeListStatistics(const char* title) const {
assert_lock_strong(&_freelistLock);
Log(gc, freelist, stats) log;
if (!log.is_debug()) {
return;
}
log.debug("%s", title);
_dictionary->report_statistics(log.debug_stream());
if (log.is_trace()) {
ResourceMark rm;
reportIndexedFreeListStatistics(log.trace_stream());
size_t total_size = totalSizeInIndexedFreeLists() +
_dictionary->total_chunk_size(DEBUG_ONLY(freelistLock()));
log.trace(" free=" SIZE_FORMAT " frag=%1.4f", total_size, flsFrag());
}
}
void CompactibleFreeListSpace::reportFreeListStatistics(const char* title) const {
assert_lock_strong(&_freelistLock);
Log(gc, freelist, stats) log;
if (!log.is_debug()) {
return;
}
log.debug("%s", title);
_dictionary->report_statistics(log.debug_stream());
if (log.is_trace()) {
ResourceMark rm;
reportIndexedFreeListStatistics(log.trace_stream());
size_t total_size = totalSizeInIndexedFreeLists() +
_dictionary->total_chunk_size(DEBUG_ONLY(freelistLock()));
log.trace(" free=" SIZE_FORMAT " frag=%1.4f", total_size, flsFrag());
}
}