RFR: 8340178: Make ArrayWithFreeList have Index type and move to utilities [v2]
Johan Sjölen
jsjolen at openjdk.org
Thu Oct 24 12:32:08 UTC 2024
On Wed, 18 Sep 2024 09:48:37 GMT, Johan Sjölen <jsjolen at openjdk.org> wrote:
>> Hi,
>>
>> This PR does multiple things:
>>
>> 1. Gives `AWFL` an index template `I` which specifies the type of the indices, this lets us have very small indices and that saves memory.
>> 2. Gives `AWFL` the ability to store things in a static memory area of a specific length
>> 3. Finally, moves it to utilities for general consumption
>>
>> For some context:
>>
>> I tried to give `GrowableArray` the index type feature, but I hit a brick wall at changing the assert messages. It's also not a feature which has consensus, some people like it, and some people think it's too complex. I find putting a smaller and hidden `resizable_array` class In AWFL to be an acceptable compromise. I also believe that `GA` will not find too much competition with `AWFL`, as it has a less rich API and is really meant as an allocator interface rather than a general array type.
>>
>> **Hint for reviewers:** Do NOT go into "Files changed", look at the commits to see the actual changes and ignore the commits with "Move" in the title.
>
> Johan Sjölen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits:
>
> - Fixes after merge
> - Merge remote-tracking branch 'openjdk/master' into move-to-utils
> - Use int
> - No need for reinterpret cast
> - Style
> - Change test
> - Change AWFL
> - Move AWFL
> - Move test
> - Changes to NCSS
Still awaiting review!
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20002#issuecomment-2435163794
More information about the hotspot-dev
mailing list