RFR: 8296776: Stop using mtNone as marker for CHeap allocations in GrowableArray [v3]

Stefan Karlsson stefank at openjdk.org
Tue Nov 15 08:39:15 UTC 2022


On Mon, 14 Nov 2022 00:12:45 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Stefan Karlsson has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Mark constructors explicit
>
>> When looking at the changes to the usages of CHeap-backed GrowableArrays it becomes apparent that all of these usages where forced to provide a value for the initial capacity. When MEMFLAGS move to the front, we can now skip having to figure an initial capacity.
> 
> The default initial capacity is 2, the explicit initial capacities are not 2 and in many case >>>2. So without an explicit capacity passed in these GrowableArrays would likely waste a lot of time unnecessarily growing. I don't think either of these parameters should really have a default value - in which case the order could have remained as it was.

I'm going to go with @dholmes-ora suggestion here, and do a similar change to the CHeapBitMap PR.

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

PR: https://git.openjdk.org/jdk/pull/11086


More information about the hotspot-dev mailing list