JDK-8233359 : Add global sized operator delete definitions
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-10-31
  • Updated: 2024-04-10
  • Resolved: 2019-11-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14 b22Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
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).

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/4ec9fc2b2f0d User: kbarrett Date: 2019-11-01 20:22:03 +0000
01-11-2019