RFR: 8340178: Make ArrayWithFreeList have Index type and move to utilities [v2]

Johan Sjölen jsjolen at openjdk.org
Wed Sep 18 09:48:37 UTC 2024


> 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

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

Changes: https://git.openjdk.org/jdk/pull/20002/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20002&range=01
  Stats: 567 lines in 5 files changed: 307 ins; 259 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/20002.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20002/head:pull/20002

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


More information about the hotspot-dev mailing list