On Wed, 12 Nov 2025 05:49:27 GMT, Kim Barrett <[email protected]> wrote:
> 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 This pull request has now been integrated. Changeset: f5bc6ee9 Author: Kim Barrett <[email protected]> URL: https://git.openjdk.org/jdk/commit/f5bc6ee90d73da00cab5cad283b9517c692bc895 Stats: 207 lines in 15 files changed: 187 ins; 20 del; 0 mod 8369187: Add wrapper for <new> that forbids use of global allocation and deallocation functions Reviewed-by: stefank, erikj, jrose ------------- PR: https://git.openjdk.org/jdk/pull/28250
