Not all metaspace allocation paths zero initialize

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: None
    • Component/s: hotspot

      Certain parts in the hotspot indicate that they expect Metaspace allocations to be zero-initialized, e.g. `Klass` constructors.

      But not all Metaspace allocation paths do this. Zero-initialization happens in Metaspace::allocate(), and some paths allocate directly from ClassLoaderMetaSpace (e.g. MetaspaceCriticalAllocation and VM_CollectForMetadataAllocation).

      The simplest solution is to move zero initialization down to either ClassLoaderMetaSpace or even to MetaspaceArena.

      We also may want to rethink this requirement (maybe a separate issue). But for now its simpler and easier just to zero allocate.

            Assignee:
            Thomas Stuefe
            Reporter:
            Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: