RFR: 8305590: Remove nothrow exception specifications from operator new [v2]
Coleen Phillimore
coleenp at openjdk.org
Thu Apr 20 18:39:50 UTC 2023
On Thu, 20 Apr 2023 08:36:53 GMT, Afshin Zafari <duke at openjdk.org> wrote:
>> JVMTI does not abort on OOM it reports an error, so we definitely do not want a terminating allocator!
>>
>> jvmtiError
>> JvmtiEnv::CreateRawMonitor(const char* name, jrawMonitorID* monitor_ptr) {
>> JvmtiRawMonitor* rmonitor = new JvmtiRawMonitor(name);
>> NULL_CHECK(rmonitor, JVMTI_ERROR_OUT_OF_MEMORY);
>
> The new operator is removed.
We decide this at the call site though by adding the nothrow parameter. Adding an overloaded operator new without a nothrow parameter that we're not supposed to call seems very marginally useful. ie not useful.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13498#discussion_r1172958617
More information about the serviceability-dev
mailing list