< prev index next >

src/share/vm/oops/constantPool.hpp

Print this page
rev 12709 : 8170812: Metaspace corruption caused by incorrect memory size for MethodCounters
Reviewed-by: kbarrett, coleenp

*** 703,713 **** bool is_within_bounds(int index) const { return 0 <= index && index < length(); } // Sizing (in words) ! static int header_size() { return sizeof(ConstantPool)/wordSize; } static int size(int length) { return align_metadata_size(header_size() + length); } int size() const { return size(length()); } #if INCLUDE_SERVICES void collect_statistics(KlassSizeStats *sz) const; #endif --- 703,715 ---- bool is_within_bounds(int index) const { return 0 <= index && index < length(); } // Sizing (in words) ! static int header_size() { ! return align_size_up(sizeof(ConstantPool), wordSize) / wordSize; ! } static int size(int length) { return align_metadata_size(header_size() + length); } int size() const { return size(length()); } #if INCLUDE_SERVICES void collect_statistics(KlassSizeStats *sz) const; #endif
< prev index next >