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

Kim Barrett kbarrett at openjdk.java.net
Fri Jul 9 20:08:55 UTC 2021


On Fri, 9 Jul 2021 13:59:01 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> `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

Kind of like the required message for our assert macro.  static_assert was fixed in C++17.

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

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


More information about the hotspot-dev mailing list