Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8359886

Not all metaspace allocation paths zero initialize

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • 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.

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

              Created:
              Updated: