RFR: 8312132: Add tracking of multiple address spaces in NMT [v46]
Johan Sjölen
jsjolen at openjdk.org
Thu Apr 25 10:13:33 UTC 2024
On Tue, 23 Apr 2024 13:18:18 GMT, Afshin Zafari <azafari at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Remove faulty condition after removing merging
>> - Add failing test case
>
> src/hotspot/share/nmt/memTracker.hpp line 184:
>
>> 182: }
>> 183:
>> 184: static inline void allocate_memory_in(MemoryFileTracker::MemoryFile* device, size_t offset, size_t size,
>
> invalid args: `nullptr` and `size == 0`.
We should add tests for `size == 0`, but in general I don't think that's a case that we should disallow. This allows for more generic code where the caller doesn't have to special-case the size being 0. Checking for `nullptr` is a good idea in these outer functions.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18289#discussion_r1579224621
More information about the hotspot-dev
mailing list