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

Gerard Ziemski gziemski at openjdk.org
Thu Feb 6 22:07:15 UTC 2025


On Thu, 6 Feb 2025 19:11:09 GMT, Johan Sjölen <jsjolen 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.

Changes requested by gziemski (Reviewer).

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?

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

PR Review: https://git.openjdk.org/jdk/pull/23497#pullrequestreview-2600104431
PR Review Comment: https://git.openjdk.org/jdk/pull/23497#discussion_r1945539268


More information about the hotspot-runtime-dev mailing list