namespace metaspace { struct ClmsStats; class MetaspaceArena;
}
// A ClassLoaderMetaspace manages MetaspaceArena(s) for a CLD. // // A CLD owns one MetaspaceArena if UseCompressedClassPointers is false. Otherwise // it owns two - one for the Klass* objects from the class space, one for the other // types of MetaspaceObjs from the non-class space. // // +------+ +----------------------+ +-------------------+ // | CLD | ---> | ClassLoaderMetaspace | ----> | (non class) Arena | // +------+ +----------------------+ | +-------------------+ allocation top // | | v // | + chunk -- chunk ... -- chunk // | // | +-------------------+ // +--> | (class) Arena | // +-------------------+ // | // + chunk ... chunk // ^ // alloc top // class ClassLoaderMetaspace : public CHeapObj<mtClass> {
// A reference to an outside lock, held by the CLD.
Mutex* const _lock;
const Metaspace::MetaspaceType _space_type;
// Arena for allocations from non-class metaspace // (resp. for all allocations if -XX:-UseCompressedClassPointers).
metaspace::MetaspaceArena* _non_class_space_arena;
// Arena for allocations from class space // (NULL if -XX:-UseCompressedClassPointers).
metaspace::MetaspaceArena* _class_space_arena;
// Allocate word_size words from Metaspace.
MetaWord* allocate(size_t word_size, Metaspace::MetadataType mdType);
// Attempt to expand the GC threshold to be good for at least another word_size words // and allocate. Returns NULL if failure. Used during Metaspace GC.
MetaWord* expand_and_allocate(size_t word_size, Metaspace::MetadataType mdType);
// Prematurely returns a metaspace allocation to the _block_freelists // because it is not needed anymore. void deallocate(MetaWord* ptr, size_t word_size, bool is_class);
// Update statistics. This walks all in-use chunks. void add_to_statistics(metaspace::ClmsStats* out) const;
DEBUG_ONLY(void verify() const;)
// This only exists for JFR and jcmd VM.classloader_stats. We may want to // change this. Capacity as a stat is of questionable use since it may // contain committed and uncommitted areas. For now we do this to maintain // backward compatibility with JFR. void calculate_jfr_stats(size_t* p_used_bytes, size_t* p_capacity_bytes) const;
}; // end: ClassLoaderMetaspace
#endif// SHARE_MEMORY_CLASSLOADERMETASPACE_HPP
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.18 Sekunden
(vorverarbeitet am 2026-09-06)
¤
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.