staticvoid VerifyMonitor(Monitor* mon, Thread* self) { // Check whether the monitor id is correct.
EXPECT_EQ(MonitorPool::MonitorIdFromMonitor(mon), mon->GetMonitorId()); // Check whether the monitor id agrees with the compuation.
EXPECT_EQ(MonitorPool::ComputeMonitorId(mon, self), mon->GetMonitorId()); // Check whether we can use the monitor ID to get the monitor.
EXPECT_EQ(mon, MonitorPool::MonitorFromMonitorId(mon->GetMonitorId()));
}
// 1) Create and release monitors without increasing the storage.
// Number of max alive monitors before resize. // Note: for correct testing, make sure this is corresponding to monitor-pool's initial size. const size_t kMaxUsage = 28;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.