< prev index next >

src/share/vm/services/virtualMemoryTracker.hpp

Print this page
rev 12121 : 8167650: NMT should check for invalid MEMFLAGS
Reviewed-by: dholmes, mockner

*** 91,100 **** --- 91,101 ---- VirtualMemory _virtual_memory[mt_number_of_types]; public: inline VirtualMemory* by_type(MEMFLAGS flag) { int index = NMTUtil::flag_to_index(flag); + assert(index >= 0 && index < mt_number_of_types, "Index out of bound."); return &_virtual_memory[index]; } inline VirtualMemory* by_index(int index) { assert(index >= 0, "Index out of bound");
< prev index next >