void MetachunkList::verify_does_not_contain(const Metachunk* c) const {
SOMETIMES(assert(contains(c) == false, "List contains this chunk.");)
}
bool MetachunkList::contains(const Metachunk* c) const { for (Metachunk* c2 = _first; c2 != NULL; c2 = c2->next()) { if (c == c2) { returntrue;
}
} returnfalse;
}
void MetachunkList::verify() const { int num = 0; const Metachunk* last_c = NULL; for (const Metachunk* c = _first; c != NULL; c = c->next()) {
num++;
assert(c->prev() != c && c->next() != c, "circularity");
assert(c->prev() == last_c, "Broken link to predecessor. Chunk " METACHUNK_FULL_FORMAT ".",
METACHUNK_FULL_FORMAT_ARGS(c));
c->verify();
last_c = c;
}
_num_chunks.check(num);
}
#endif// ASSERT
size_t MetachunkList::calc_committed_word_size() const { if (_first != NULL && _first->is_dead()) { // list used for chunk header pool; dead chunks have no size. return0;
}
size_t s = 0; for (Metachunk* c = _first; c != NULL; c = c->next()) {
assert(c->is_dead() == false, "Sanity");
s += c->committed_words();
} return s;
}
size_t MetachunkList::calc_word_size() const { if (_first != NULL && _first->is_dead()) { // list used for chunk header pool; dead chunks have no size. return0;
}
size_t s = 0; for (Metachunk* c = _first; c != NULL; c = c->next()) {
assert(c->is_dead() == false, "Sanity");
s += c->committed_words();
} return s;
}
void MetachunkList::print_on(outputStream* st) const { if (_num_chunks.get() > 0) { for (const Metachunk* c = _first; c != NULL; c = c->next()) {
st->print(" - <");
c->print_on(st);
st->print(">");
}
st->print(" - total : %d chunks.", _num_chunks.get());
} else {
st->print("empty");
}
}
} // namespace metaspace
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-10)
¤
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.