RFR: 8333658: NMT: Use an allocator with 4-byte pointers to save memory in NativeCallStackStorage [v9]
Johan Sjölen
jsjolen at openjdk.org
Fri Jun 7 13:35:15 UTC 2024
On Thu, 6 Jun 2024 13:43:35 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> Johan Sjölen has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add include guards
>
> src/hotspot/share/nmt/indexedFreeListAllocator.hpp line 75:
>
>> 73: E& translate(I i) {
>> 74: return backing_storage.at(i.idx).e;
>> 75: }
>
> - I'd just call this function "at" as we usually do.
> - I also would provide a const variant that exposes const E&.
> - Please assert for i to be correct (not nil, not oob)
Out-of-bounds should be taken care of by GrowableArray, luckily.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18979#discussion_r1631210301
More information about the hotspot-dev
mailing list