Inconsistent failure mode for MetaspaceObj::operator new(size_t, MemTag)

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: None
    • Component/s: hotspot
    • None
    • b26

      The overload `MetaspaceObj::operator new(size_t, MemTag)` was added by JDK-8355003. It is declared nothrow. But it is implemented by calling `AllocateHeap` with the default failure type, e.g. `EXIT_OOM`. If it needs to return null on allocation failure then the failure mode for `AllocateHeap` needs to be changed to `RETURN_NULL`. If it doesn't need to return null, then the nothrow exception specification should be removed, to avoid unnecessary overhead from that specification.

            Assignee:
            Igor Veresov
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: