RFR: JDK-8307356: Metaspace: simplify BinList handling [v3]
Thomas Stuefe
stuefe at openjdk.org
Thu Aug 17 12:05:35 UTC 2023
On Tue, 23 May 2023 15:37:52 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Feedback David
>
> src/hotspot/share/memory/metaspace/metaspaceArena.cpp line 382:
>
>> 380: assert_is_aligned_metaspace_pointer(p);
>> 381: size_t raw_word_size = get_raw_word_size_for_requested_word_size(word_size);
>> 382:
>
> If this is deallocating a pointer returned from metaspace, why isn't raw_word_size the same as word_size?
This only matters for 32-bit.
There, we align allocation size to 2 words (64 bits). If someone deallocates a pointer to, say, 3 words (12 bytes), Metaspace knows that the block is really 16 bytes long and that is what we should store in the freelist.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13776#discussion_r1297120916
More information about the hotspot-runtime-dev
mailing list