On Mon, 13 May 2024 10:13:50 GMT, Stefan Karlsson <stef...@openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Update mallocLimit.hpp
>
> src/hotspot/share/nmt/memflags.cpp line 31:
> 
>> 29: 
>> 30: // Extra insurance that MEMFLAGS truly has the same size as uint8_t.
>> 31: STATIC_ASSERT(sizeof(MEMFLAGS) == sizeof(uint8_t));
> 
> I think you can remove this entire .cpp file. There's no need to check the 
> size of an enum with a specified base type.

I rather have this explicit check. If MEMFLAGS>1byte, things break, and I would 
like to make that explicit.

That said, I can move this static assert to the header. I just wanted to avoid 
including debug.hpp. My original intent was for this cpp file to be the place 
in the future for any MEMFLAGS related utility functions, e.g. 
to-and-from-string conversations.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19172#discussion_r1598583814

Reply via email to