RFR: 8306841: Generational ZGC: NMT reports Java heap size larger than max heap size
Thomas Stuefe
stuefe at openjdk.org
Thu Jun 8 07:06:49 UTC 2023
On Thu, 8 Jun 2023 06:52:09 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> src/hotspot/share/gc/z/zPhysicalMemory.cpp line 285:
>>
>>> 283: // When this function is called we don't know where in the virtual memory
>>> 284: // this physical memory will be mapped. So we fake that the virtual memory
>>> 285: // address is the heap base + the given offset.
>>
>> Question of a casual ZGC source reader: when you talk about physical vs virtual here, you are not talking about the real physical vs virtual, right? You are talking about offsets into the ZGC backing file vs attach points of said offsets in the virtual address space?
>
> Right, but the backing file is backed by physical memory and that's where the name comes from. The backing file is just the way for us to get hold of physical memory, which we can map into the virtual address space. I hope that makes sense.
It does, thank you.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14355#discussion_r1222548008
More information about the hotspot-dev
mailing list