RFR: 8301403: Eliminate memory allocations in JVMFlag::printFlags during signal handling [v10]

Gerard Ziemski gziemski at openjdk.org
Fri Jul 26 15:02:35 UTC 2024


On Fri, 26 Jul 2024 06:50:23 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> <sigh> I don't understand what Windows was complaining about, and I really don't like the way constexpr had to spread like a virus. If the problem was the definition of `length` why did other code have to change?

Anything that is a part of the definition of the array's size in

`  BitMap::bm_word_t iteratorArray[BitMap::calc_size_in_words(length)];
`

must be `constexpr`, not just `length`, which means that I had to follow the rabbit into a deep hole and had to make bunch of changes in the entire call chain of `BitMap::calc_size_in_words()` implementation.

Note: macOS and Linux compiler were happy with just `const`, however, Windows wants `constexpr`.

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

PR Comment: https://git.openjdk.org/jdk/pull/20202#issuecomment-2252948597


More information about the hotspot-runtime-dev mailing list