8369187: Add wrapper for <new> that forbids use of global allocation and 
deallocation functions

Please review this change that adds `cppstdlib/new.hpp` as a wrapper for
including `<new>`. All existing inclusions of `<new>` are changed to include
the new wrapper.

In additional to including `<new>`, this wrapper also provides deprecation
declarations to prevent the use of some facilities by HotSpot code.

However, those deprecations need to be conditionalized to not apply to gtests,
so this change also adds a macro definition provided by the build system for
use in detecting that a header is being included by a gtest.

Testing: mach5 tier1

-------------

Commit messages:
 - add wrapper for <new>

Changes: https://git.openjdk.org/jdk/pull/28250/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28250&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8369187
  Stats: 165 lines in 15 files changed: 143 ins; 22 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/28250.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28250/head:pull/28250

PR: https://git.openjdk.org/jdk/pull/28250

Reply via email to