On Mon, 9 Feb 2026 07:03:47 GMT, Thomas Stuefe <[email protected]> wrote:

>> src/hotspot/share/memory/metaspace.cpp line 661:
>> 
>>> 659:   MaxMetaspaceSize = MAX2(MaxMetaspaceSize, commit_alignment());
>>> 660: 
>>> 661:   if (using_class_space()) {
>> 
>> Shouldn't this now just be a build-time `ifdef _LP64` check?
>
> It is. using_class_space is true on LP64, false on 32-bit. Mostly a matter of 
> taste. I kept the function here since it conveys more information than just a 
> blank ifdef. And this approach (if uses as negation) minimizes compile errors 
> on the other side since nobody bothers to build on 32-bit anymore.
> 
> I have no strong emotions, though. If reviewers prefer it, I'll replace it 
> with a blank ifdef _LP64.

I prefer it simply so we can see this is truly a build-time check and not a 
run-time check.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28366#discussion_r2785863849

Reply via email to