RFR(S): 8039805: Fix the signature of the global new/delete operators in allocation.cpp
Thomas Stüfe
thomas.stuefe at gmail.com
Thu Apr 10 05:49:35 UTC 2014
>
> But that's not what I want and not what I actually did. As I wrote, the
> global operators are only defined in a not-product configuration. That's
> exactly how it should be and I didn't change that.
>
> 'optimized' is a Hotspot build configuration which builds the Hotspot in
> optimized mode but without defining 'PRODUCT' - i.e. an optimized
> non-product build (just take look at the Hotspot make files). Of course you
> have no assertions in an optimized build, that's why I changed the asserts
> in the global operators into guarantees.
>
>
>
Hi Volker,
I did not think you wanted to define global operator new in production code.
What I meant is that I think that defining global operator new is dangerous
and I do not want to ship that even accidentally; accidents happen,
makefiles can change.
To make that intention clear, I would generate a compile time error in the
to-be-shipped code right in the source code where the operators are
defined. A guarantee() is not a compile time error and does not make this
intention clear.
Kind Regards, Thomas
More information about the hotspot-dev
mailing list