RFR: 8349580: Do not use address in MemTracker top level functions

Johan Sjölen jsjolen at openjdk.org
Fri Feb 7 09:10:11 UTC 2025


On Thu, 6 Feb 2025 22:03:54 GMT, Gerard Ziemski <gziemski at openjdk.org> wrote:

>> Hi,
>> 
>> Please consider this trivial patch. Note that this gives us consistency with `reserve_memory`.
>> 
>> ```c++
>>   static inline void record_virtual_memory_reserve(void* addr, size_t size, /* ... */);
>> 
>> 
>> Thanks.
>
> src/hotspot/share/nmt/memTracker.hpp line 142:
> 
>> 140:     if (!enabled()) return;
>> 141:     if (addr != nullptr) {
>> 142:       VirtualMemoryTracker::remove_released_region((address)addr, size);
> 
> What about here?

Hi,

That's correct as VMT does take `address`, whilst the external API takes "regular" pointers.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23497#discussion_r1946200788


More information about the hotspot-runtime-dev mailing list