RFR: JDK-8312018: Improve reservation of class space and CDS [v4]

Ioi Lam iklam at openjdk.org
Tue Aug 15 04:23:10 UTC 2023


On Fri, 11 Aug 2023 16:31:59 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> src/hotspot/os/linux/os_linux.cpp line 4229:
>> 
>>> 4227:   // good protection against NULL references while still leaving enough of the lower
>>> 4228:   // 4G addressable.
>>> 4229:   return (char*)(MAX2(os::vm_allocation_granularity(), 16 * M));
>> 
>> The code doesn't do what the comment says.
>
> I fixed the comment and made it hopefully much clearer

It's unclear which part of the implementation `(MAX2(os::vm_allocation_granularity(), 16 * M))` is "Determined by sysctl vm.mmap_min_addr`.

Do you mean:

- On Linux the lower limit is usually 64KB. While it can be configured via `sysctl vm.mmap_min_addr`, that's rarely done.
- We picked a 16MB minimum just to be safe.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15041#discussion_r1294167186


More information about the hotspot-runtime-dev mailing list