RFR(xxs): 8202424: Metaspace: on chunk retirement, use correct lower limit on chunksize when adding blocks to free blocks list.
thomas.stuefe at gmail.com
Mon Apr 30 14:07:39 UTC 2018
please review this small fix, which fixes a small metaspace leak when
Some time ago, JDK-8164921 got rid of dark matter by lowering the
smallest block size which can be managed by the free block list to
When retiring chunks, the leftover space in the old chunk is added to
the free block list via SpaceManager::deallocate(). Here, we still
unnecessarily assume a lower size limit of TreeChunk<Metablock,
FreeList<Metablock> >::min_size(), which is unnecessary high and
causes leaks which show up as waste in the retired chunks.
By correctly using SmallBlocks::small_block_min_size() when
deallocating the leftover chunk space on chunk retirement, we can
reduce that kind of waste to almost nil.
More information about the hotspot-runtime-dev