RFR: 8253779: Amalloc may be wasting space by overaligning [v2]

Coleen Phillimore coleenp at openjdk.java.net
Fri Jul 9 14:01:55 UTC 2021


On Fri, 9 Jul 2021 03:56:03 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Changing it so.  Why is there capital STATIC_ASSERT and not capital static_assert ?  Is there now a preference?
>
> `static_assert` is new in C++11, `STATIC_ASSERT` is a macro that provides somewhat similar functionality (but without the informative message) that works before C++11. I think we should prefer `static_assert` now; the only (arguable) downside is that (until C++17) the informative message is required.

I was sort of underwhelmed with the usefulness of this:
runtime/synchronizer.cpp:        static_assert(is_power_of_2(NINFLATIONLOCKS), "must be");
I'll change it to lower case static_assert

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

PR: https://git.openjdk.java.net/jdk/pull/4732


More information about the hotspot-dev mailing list