RFR: 8336378: Parallel: Rename allocate to expand_and_allocate in PSOldGen
Albert Mingkun Yang
ayang at openjdk.org
Mon Jul 15 09:51:51 UTC 2024
On Mon, 15 Jul 2024 09:42:23 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
>> Trivial renaming a method.
>
> src/hotspot/share/gc/parallel/psOldGen.hpp line 124:
>
>> 122: HeapWord* res;
>> 123: do {
>> 124: res = cas_allocate_noexpand(word_size);
>
> seems incorrect that we can allocate without expanding, yet the method name is "expand_and_allocate". Or you write a bit more about the motivation behind this renaming.
`ParallelScavengeHeap::expand_heap_and_allocate` can allocate without doing expansion. The renaming is mostly for including the potential expansion in the name. Otherwise, it's not obvious that expansion is attempted in the caller context.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20181#discussion_r1677572713
More information about the hotspot-gc-dev
mailing list