RFR: 8322476: Remove GrowableArray C-Heap version, replace usages with GrowableArrayCHeap

Stefan Karlsson stefank at openjdk.org
Fri Dec 22 13:24:37 UTC 2023


On Wed, 20 Dec 2023 21:11:09 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> I'm not a fan of the additional clutter in APIs that the static memory types add. If we had a variant of GrowableArrayCHeap that was not itself dynamically allocatable and took a memory type to use internally as a constructor argument, then I think a lot of that clutter could be eliminated. It could be used for ordinary data members that are direct GAs rather than pointers to GAs. I think there is a way to do something similar for static data members that are pointers that are dynamically allocated later, though that probably requires more work.

FWIW, I added the GrowableArrayCHeap and the static memory type. I did that because there was a perceived need to minimize the memory usage, because we were going to use an extreme amount of these arrays for one of our subsystems in ZGC. It later turned out that we really didn't need to squeeze out the last bit of memory for that use-case. I would really like to get rid of the the static memory type from GrowableArrayCHeap, and just add it as an instance member.

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

PR Comment: https://git.openjdk.org/jdk/pull/17160#issuecomment-1867683570


More information about the serviceability-dev mailing list