RFR(S): 8039805: Fix the signature of the global new/delete operators in allocation.cpp
thomas.stuefe at gmail.com
Wed Apr 9 17:50:02 UTC 2014
> This change also replaces the asserts in the operators with guarantees
> because the code may also be active in not-product (aka. 'optimized')
I think defining global operator new in production code would be a bad
the most obvious reason would be that any third party binary loaded into
process space could do a new() which would trigger the guarantee.
So, I'd prefer a
in the code...
If we really want to enable global operator new/delete for production code,
should provide allocations instead of guaranteeing or returning NULL.
But this still would be dangerous, mainly because it is possible that other
libraries bring their own versions of op new/delete and they may interfere
with our operators.
Kind Regards, Thomas
More information about the hotspot-dev