Relates :
|
After JDK-8038930 the calculation of the static memory used by the code root chunk manager is wrong: instead of 86 size_t G1CodeRootChunkManager::static_mem_size() { 87 return sizeof(this); 88 } Also in other places the code uses sizeof(this) instead of sizeof(class name), e.g. $ grep -r "sizeof(this)" src/share/vm/gc_implementation/g1/ src/share/vm/gc_implementation/g1/sparsePRT.cpp: return sizeof(this) + src/share/vm/gc_implementation/g1/sparsePRT.cpp: return sizeof(this) +_next->mem_size(); src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp: return sizeof(this); src/share/vm/gc_implementation/g1/g1CodeCacheRemSet.cpp: return sizeof(this) + _list.count() * _list.size(); src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp: + (sizeof(this) - sizeof(OtherRegionsTable)) src/share/vm/gc_implementation/g1/heapRegionRemSet.cpp: return sizeof(this) + _bm.size_in_words() * HeapWordSize; All these terms are wrong, should use sizeof(*this) or sizeof(class name). Fix this.