Details
-
Bug
-
Resolution: Fixed
-
P3
-
19
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8290283 | 20 | Maurizio Cimadamore | P3 | Resolved | Fixed | b07 |
JDK-8291420 | 19.0.2 | Maurizio Cimadamore | P3 | Resolved | Fixed | b01 |
JDK-8291295 | 19.0.1 | Maurizio Cimadamore | P3 | Resolved | Fixed | b04 |
Description
Observed that allocate(bytesSize) and allocate(bytesSize, alignment) might throw OutOfMemoryError when bytesSize is too long.
IMO, this can be stated in spec.
And also observed that allocate(bytesSize, alignment) can return null, with
====
SegmentAllocator segmentAllocator = SegmentAllocator.newNativeArena(MemorySession.openConfined());
MemorySegment memorySegment = segmentAllocator.allocate(Long.MAX_VALUE, 2);
System.out.println(" The memorySegment is " + memorySegment);
====
If this is a valid case Spec can be enhanced for this.
IMO, this can be stated in spec.
And also observed that allocate(bytesSize, alignment) can return null, with
====
SegmentAllocator segmentAllocator = SegmentAllocator.newNativeArena(MemorySession.openConfined());
MemorySegment memorySegment = segmentAllocator.allocate(Long.MAX_VALUE, 2);
System.out.println(" The memorySegment is " + memorySegment);
====
If this is a valid case Spec can be enhanced for this.
Attachments
Issue Links
- backported by
-
JDK-8290283 SegmentAllocator:allocate() can return null some cases
- Resolved
-
JDK-8291295 SegmentAllocator:allocate() can return null some cases
- Resolved
-
JDK-8291420 SegmentAllocator:allocate() can return null some cases
- Resolved
- relates to
-
JDK-8282192 Implementation of Foreign Function & Memory API (Preview)
- Closed
(1 links to)