On Wed, 20 Dec 2023 21:11:09 GMT, Kim Barrett <kbarr...@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

Reply via email to