8338489: Typo in MemorySegment doc
Reviewed-by: rriggs, mcimadamore, iris
This commit is contained in:
parent
44d3a68d8a
commit
2e96f159aa
@ -475,7 +475,7 @@ import jdk.internal.vm.annotation.ForceInline;
|
||||
* MemorySegment ptr = null;
|
||||
* try (Arena arena = Arena.ofConfined()) {
|
||||
* MemorySegment z = segment.get(ValueLayout.ADDRESS, ...); // size = 0, scope = always alive
|
||||
* ptr = z.reinterpret(16, arena, null); // size = 4, scope = arena.scope()
|
||||
* ptr = z.reinterpret(16, arena, null); // size = 16, scope = arena.scope()
|
||||
* int x = ptr.getAtIndex(ValueLayout.JAVA_INT, 3); // ok
|
||||
* }
|
||||
* int x = ptr.getAtIndex(ValueLayout.JAVA_INT, 3); // throws IllegalStateException
|
||||
|
Loading…
x
Reference in New Issue
Block a user