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

Gerard Ziemski gziemski at openjdk.org
Fri Jul 26 20:51:38 UTC 2024


On Fri, 26 Jul 2024 15:17:00 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> I am fine with the constexpr.
> 
> But note, if you want to keep the patch minimal, you could just do the calculation by hand:
> 
> ```
> constexpr size_t num_words_needed = (length / (sizeof(BitMap::bm_word_t) * 8)) + 1);
> BitMap::bm_word_t iteratorArray[num_words_needed];
> ```
> 
> Up to you. This is fine by me.

Thank you for the feedback!

I'm not too crazy about exposing the details of BitMap, just so that we get away from using `constexpr`. I think we will find ourselves needing it more and more as we go forward, so I'd rather do the right thing and make the changes here.

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

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


More information about the hotspot-runtime-dev mailing list