RFR: 8254878: Move last piece of ZArray to GrowableArray [v2]

Per Liden pliden at openjdk.java.net
Mon Oct 19 12:25:14 UTC 2020


On Mon, 19 Oct 2020 08:22:47 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:

>> Per Liden has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev
>> excludes the unrelated changes brought in by the merge/rebase. The pull request contains one additional commit since
>> the last revision:
>>   8254878: Move last piece of ZArray to GrowableArray
>
> src/hotspot/share/utilities/growableArray.hpp line 696:
> 
>> 694:
>> 695: public:
>> 696:   GrowableArrayCHeap(int initial_max = 0) :
> 
> Just noting that GrowableArray defaults to 2 and here we default to 0.

Thanks for reviewing. For a CHeap allocater array I think an initial_max of 0 makes more sense, since the cost of doing
an allocation is typically higher, and lazily allocating the array means we will avoid the allocation cost all together
in cases where an array was created but elements were never added.

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

PR: https://git.openjdk.java.net/jdk/pull/694



More information about the hotspot-gc-dev mailing list