RFR: 8334371: [AIX] Beginning with AIX 7.3 TL1 mmap() supports 64K memory pages
Thomas Stuefe
stuefe at openjdk.org
Tue Jun 18 15:18:17 UTC 2024
On Tue, 18 Jun 2024 15:01:54 GMT, Joachim Kern <jkern at openjdk.org> wrote:
>> src/hotspot/os/aix/os_aix.cpp line 459:
>>
>>> 457: {
>>> 458: void* p = mmap(NULL, 1000000, PROT_READ | PROT_WRITE, MAP_ANON_64K | MAP_ANONYMOUS | MAP_SHARED, -1, 0);
>>> 459: guarantee0(p != (void*) -1); // Should always work.
>>
>> I probably introduced those guarantee's myself many years ago, but we actually used guarantee very rarely, only for things that absolutely have to work, or the world explodes.
>>
>> Here, there are a number of reasons why an mmap could fail, and you probably don't want to crash the VM with an guarantee at a customer site. I'd use assert.
>
> And what about the other guarantees in the same function after shmget() or shmat()?
Yes, these are my faults. When I did them originally, I did not know better ( ~20 years ago). In new code, lets prefer assert. Up to you if you want to take the opportunity and clean up old code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19771#discussion_r1644640575
More information about the hotspot-runtime-dev
mailing list