Code review request: JDK-8001592 NMT: assertion failed: assert(_amount >= amt) failed: Just check: memBaseline.hpp:180
zhengyu.gu at oracle.com
Wed Nov 7 08:26:01 PST 2012
The assertion failure reflects that total memory that backs arenas are
greater than total memory chunks for backing all arenas, which is
The problem is due to Arena object, although it is declared as C-heap
object, but it is used as value objects and stack objects as well. Value
and stack objects do not have tracking records in NMT, which can leave
arena size records alone in NMT. Because NMT uses Arena's deallocation
records to cleanup size records, that means those leftover size records
are not get cleanup.
The solution is to use Arena's destructor to reset arena size to 0, and
NMT uses this record to remove the corresponding record.
The webrev also cleanup Memsnapshot::merge() routine, since virtual
memory records now are stored in separate array, malloc staging area can
keep only one record for each address (whoever has higher sequence
number win), which should reduce memory usage by NMT.
vm.quick.testlist on Linux 32, Windows x64, Solaris AMD64 and Sparcv9
More information about the hotspot-dev