-
Enhancement
-
Resolution: Fixed
-
P4
-
None
Several things can be done to improve the performance of allocating a native memory segment.
- Delay the creation of the NativeMemorySegmentImpl, this avoids the merge of the instance with the one obtained from the call in the uncommon path. Increase the chance the object being scalar replaced.
- Split the allocation of over-aligned memory to a slow-path method.
- Align the memory to 8 bytes, allowing faster zeroing.
- Use a dedicated method to zero the just-allocated native memory, reduce code size and make it more straightforward.
- Make VM.pageAlignDirectMemory a Boolean instead of a boolean so that false value can be constant folded.
- Delay the creation of the NativeMemorySegmentImpl, this avoids the merge of the instance with the one obtained from the call in the uncommon path. Increase the chance the object being scalar replaced.
- Split the allocation of over-aligned memory to a slow-path method.
- Align the memory to 8 bytes, allowing faster zeroing.
- Use a dedicated method to zero the just-allocated native memory, reduce code size and make it more straightforward.
- Make VM.pageAlignDirectMemory a Boolean instead of a boolean so that false value can be constant folded.
- links to
-
Commit(master) openjdk/jdk/e1bcff3a
-
Review(master) openjdk/jdk/22610