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

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

XMLWordPrintable

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

            iveresov Igor Veresov
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: