Add an assert that Metaspace::allocate should not be called in VM thread

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P4
    • tbd
    • Affects Version/s: 12
    • Component/s: hotspot
    • None

      MetaWord* Metaspace::allocate(ClassLoaderData* loader_data, size_t word_size,
                                    MetaspaceObj::Type type, TRAPS) {
      + assert(!THREAD->is_VM_thread(), "metaspace allocation may cause GC, but GC cannot be started in VM thread")

            Assignee:
            Ioi Lam
            Reporter:
            Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: