Add global sized operator delete definitions

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 14
    • Affects Version/s: 14
    • Component/s: hotspot
    • None
    • b22

      C++14 added global sized operator delete functions:

        void operator delete(void* p, size_t size) throw();
        void operator delete [](void* p, size_t size) throw();

      These functions are replaceable, just like the other allocation and deallocation functions.

      In non-product builds, memory/operator_new.cpp provides replacement definitions that call fatal(), to help prevent forbidden use by HotSpot code. (There is also a link-time check in the build system.)

      To support C++14 we should provide similar definitions for the new sized deallocation functions. Since we're already using C++14 when building with Visual Studio 2017 or later, we ought to provide such definitions now, at least for that platform. And we need them when doing experimental C++14 builds with gcc, else we get -Wsized-deallocation warnings (enabled by the recent addition of -Wextra).

            Assignee:
            Kim Barrett
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: