JDK-8365245 : Move size reducing operations to GrowableArrayWithAllocator
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-08-11
  • Updated: 2025-08-17
  • Resolved: 2025-08-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 26
26 masterFixed
Related Reports
Relates :  
Description
We want to change GrowableArray to not initialize elements in the range from size to capacity. (JDK-8319115)

We also want to change GrowableArray to be something like standard C++ "allocator aware", to permit allocator-using element types (like GrowableArray!). (No JBS issue yet, I think.) One reason for doing this is to allow detecting that the allocator is an arena style allocator and skipping element destruction.

As a precondition to those, all operations that change the size need to have access to the allocator. All operations that may increase the size might need to grow the underlying storage, so are already provided at the GrowableArrayWithAllocator layer. But operations that reduce the size are in GrowableArrayView, or even GrowableArrayBase. Those operations should be moved to GrowableArrayWithAllocator.

Comments
Changeset: bd65d483 Branch: master Author: Kim Barrett <kbarrett@openjdk.org> Date: 2025-08-17 12:56:42 +0000 URL: https://git.openjdk.org/jdk/commit/bd65d483df4742bb7ce79b613f10f70a45117f84
17-08-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/26726 Date: 2025-08-11 13:06:01 +0000
11-08-2025