// Returns the index'th monitor BasicObjectLock* at(int index) { assert(index >= 0 && index < number_of_monitors(), "out of bounds check"); return &monitors()[index]; }
// Tells whether the addr point into the monitors. bool contains(void* addr) const { return (addr >= (void*) monitors()) && (addr < (void*) (monitors() + number_of_monitors())); }
void MonitorChunk::oops_do(OopClosure* f) { for (int index = 0; index < number_of_monitors(); index++) { at(index)->oops_do(f); } }