Interface Pointer
- All Superinterfaces:
ComparableWord
,PointerBase
,UnsignedWord
,WordBase
Do not use these methods to access Java objects. These methods access the raw memory without any null checks, read- or write barriers. Even when the VM uses compressed pointers, then readObject and writeObject methods access uncompressed pointers.
- Since:
- 19.0
-
Method Summary
Modifier and TypeMethodDescriptionadd
(int val) Returns a Pointer whose value is(this + val)
.add
(UnsignedWord val) Returns a Pointer whose value is(this + val)
.and
(int val) Returns a Pointer whose value is(this & val)
.and
(UnsignedWord val) Returns a Pointer whose value is(this & val)
.int
compareAndSwapInt
(int offset, int expectedValue, int newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.int
compareAndSwapInt
(WordBase offset, int expectedValue, int newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.long
compareAndSwapLong
(int offset, long expectedValue, long newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.long
compareAndSwapLong
(WordBase offset, long expectedValue, long newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.compareAndSwapObject
(int offset, Object expectedValue, Object newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.compareAndSwapObject
(WordBase offset, Object expectedValue, Object newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.<T extends WordBase>
TcompareAndSwapWord
(int offset, T expectedValue, T newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.<T extends WordBase>
TcompareAndSwapWord
(WordBase offset, T expectedValue, T newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.void
initializeLong
(int offset, long val, LocationIdentity locationIdentity) Initializes the memory at address(this + offset)
.void
initializeLong
(WordBase offset, long val, LocationIdentity locationIdentity) Initializes the memory at address(this + offset)
.boolean
logicCompareAndSwapInt
(int offset, int expectedValue, int newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.boolean
logicCompareAndSwapInt
(WordBase offset, int expectedValue, int newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.boolean
logicCompareAndSwapLong
(int offset, long expectedValue, long newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.boolean
logicCompareAndSwapLong
(WordBase offset, long expectedValue, long newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.boolean
logicCompareAndSwapObject
(int offset, Object expectedValue, Object newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.boolean
logicCompareAndSwapObject
(WordBase offset, Object expectedValue, Object newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.boolean
logicCompareAndSwapWord
(int offset, WordBase expectedValue, WordBase newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.boolean
logicCompareAndSwapWord
(WordBase offset, WordBase expectedValue, WordBase newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value.or
(int val) Returns a Pointer whose value is(this | val)
.or
(UnsignedWord val) Returns a Pointer whose value is(this | val)
.byte
readByte
(int offset) Reads the memory at address(this + offset)
.byte
readByte
(int offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.byte
Reads the memory at address(this + offset)
.byte
readByte
(WordBase offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.char
readChar
(int offset) Reads the memory at address(this + offset)
.char
readChar
(int offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.char
Reads the memory at address(this + offset)
.char
readChar
(WordBase offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.double
readDouble
(int offset) Reads the memory at address(this + offset)
.double
readDouble
(int offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.double
readDouble
(WordBase offset) Reads the memory at address(this + offset)
.double
readDouble
(WordBase offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.float
readFloat
(int offset) Reads the memory at address(this + offset)
.float
readFloat
(int offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.float
Reads the memory at address(this + offset)
.float
readFloat
(WordBase offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.int
readInt
(int offset) Reads the memory at address(this + offset)
.int
readInt
(int offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.int
Reads the memory at address(this + offset)
.int
readInt
(WordBase offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.long
readLong
(int offset) Reads the memory at address(this + offset)
.long
readLong
(int offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.long
Reads the memory at address(this + offset)
.long
readLong
(WordBase offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.readObject
(int offset) Reads the memory at address(this + offset)
.readObject
(int offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.readObject
(WordBase offset) Reads the memory at address(this + offset)
.readObject
(WordBase offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.short
readShort
(int offset) Reads the memory at address(this + offset)
.short
readShort
(int offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.short
Reads the memory at address(this + offset)
.short
readShort
(WordBase offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.<T extends WordBase>
TreadWord
(int offset) Reads the memory at address(this + offset)
.<T extends WordBase>
TreadWord
(int offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.<T extends WordBase>
TReads the memory at address(this + offset)
.<T extends WordBase>
TreadWord
(WordBase offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
.<T extends WordBase>
TreadWordVolatile
(int offset, LocationIdentity locationIdentity) Reads the memory at address(this + offset)
in accordance with the volatile semantics.subtract
(int val) Returns a Pointer whose value is(this - val)
.subtract
(UnsignedWord val) Returns a Pointer whose value is(this - val)
.toObject()
Unsafe conversion of this Pointer to a Java language object.<T> T
Convert pointer to the type specified by the clazz argument.Unsafe conversion of this Pointer to a Java language object.void
writeByte
(int offset, byte val) Writes the memory at address(this + offset)
.void
writeByte
(int offset, byte val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
Writes the memory at address(this + offset)
.void
writeByte
(WordBase offset, byte val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
writeChar
(int offset, char val) Writes the memory at address(this + offset)
.void
writeChar
(int offset, char val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
Writes the memory at address(this + offset)
.void
writeChar
(WordBase offset, char val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
writeDouble
(int offset, double val) Writes the memory at address(this + offset)
.void
writeDouble
(int offset, double val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
writeDouble
(WordBase offset, double val) Writes the memory at address(this + offset)
.void
writeDouble
(WordBase offset, double val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
writeFloat
(int offset, float val) Writes the memory at address(this + offset)
.void
writeFloat
(int offset, float val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
writeFloat
(WordBase offset, float val) Writes the memory at address(this + offset)
.void
writeFloat
(WordBase offset, float val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
writeInt
(int offset, int val) Writes the memory at address(this + offset)
.void
writeInt
(int offset, int val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
Writes the memory at address(this + offset)
.void
writeInt
(WordBase offset, int val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
writeLong
(int offset, long val) Writes the memory at address(this + offset)
.void
writeLong
(int offset, long val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
Writes the memory at address(this + offset)
.void
writeLong
(WordBase offset, long val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
writeObject
(int offset, Object val) Writes the memory at address(this + offset)
.void
writeObject
(int offset, Object val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
writeObject
(WordBase offset, Object val) Writes the memory at address(this + offset)
.void
writeObject
(WordBase offset, Object val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
writeShort
(int offset, short val) Writes the memory at address(this + offset)
.void
writeShort
(int offset, short val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
writeShort
(WordBase offset, short val) Writes the memory at address(this + offset)
.void
writeShort
(WordBase offset, short val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
Writes the memory at address(this + offset)
.void
writeWord
(int offset, WordBase val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
Writes the memory at address(this + offset)
.void
writeWord
(WordBase offset, WordBase val, LocationIdentity locationIdentity) Writes the memory at address(this + offset)
.void
writeWordVolatile
(int offset, WordBase val) Writes the memory at address(this + offset)
in accordance with the volatile semantics.Methods inherited from interface org.graalvm.word.ComparableWord
equal, notEqual
Methods inherited from interface org.graalvm.word.PointerBase
isNonNull, isNull
Methods inherited from interface org.graalvm.word.UnsignedWord
aboveOrEqual, aboveOrEqual, aboveThan, aboveThan, belowOrEqual, belowOrEqual, belowThan, belowThan, equal, equal, multiply, multiply, not, notEqual, notEqual, shiftLeft, shiftLeft, unsignedDivide, unsignedDivide, unsignedRemainder, unsignedRemainder, unsignedShiftRight, unsignedShiftRight, xor, xor
-
Method Details
-
toObject
Object toObject()Unsafe conversion of this Pointer to a Java language object. No correctness checks or type checks are performed. The caller must ensure that the Pointer contains a valid Java object that can i.e., processed by the garbage collector.- Returns:
- this Pointer cast to Object.
- Since:
- 19.0
-
toObject
Convert pointer to the type specified by the clazz argument.- Parameters:
clazz
- the type to which to cast the pointernonNull
- true if the value cannot be null- Returns:
- this Pointer cast to type T
- Since:
- 23.1
-
toObjectNonNull
Object toObjectNonNull()Unsafe conversion of this Pointer to a Java language object. No correctness checks or type checks are performed. The caller must ensure that the Pointer contains a valid Java object that can i.e., processed by the garbage collector and the Pointer does not contain 0.- Returns:
- this Pointer cast to non-null Object.
- Since:
- 19.0
-
readByte
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readChar
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readShort
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readInt
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readLong
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readFloat
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readDouble
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readWord
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readObject
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readByte
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readChar
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readShort
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readInt
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readLong
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readFloat
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readDouble
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readWord
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readObject
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
readWordVolatile
Reads the memory at address(this + offset)
in accordance with the volatile semantics. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accesslocationIdentity
- the identity of the read- Returns:
- the result of the memory access
- Since:
- 19.0
-
writeByte
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeChar
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeShort
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeInt
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeLong
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeFloat
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeDouble
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeWord
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
initializeLong
Initializes the memory at address(this + offset)
. Both the base address and offset are in bytes. The memory must be uninitialized or zero prior to this operation.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeObject
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeByte
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeChar
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeShort
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeInt
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeLong
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeFloat
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeDouble
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeWord
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
initializeLong
Initializes the memory at address(this + offset)
. Both the base address and offset are in bytes. The memory must be uninitialized or zero prior to this operation.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
writeObject
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memorylocationIdentity
- the identity of the write- Since:
- 19.0
-
readByte
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readChar
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readShort
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readInt
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readLong
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readFloat
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readDouble
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readWord
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readObject
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readByte
byte readByte(int offset) Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readChar
char readChar(int offset) Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readShort
short readShort(int offset) Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readInt
int readInt(int offset) Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readLong
long readLong(int offset) Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readFloat
float readFloat(int offset) Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readDouble
double readDouble(int offset) Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readWord
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
readObject
Reads the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory access- Returns:
- the result of the memory access
- Since:
- 19.0
-
writeByte
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeChar
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeShort
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeInt
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeLong
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeFloat
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeDouble
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeWord
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeObject
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
compareAndSwapInt
int compareAndSwapInt(WordBase offset, int expectedValue, int newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
- The value that was read for comparison, which is
expectedValue
if the exchange was performed. - Since:
- 19.0
-
compareAndSwapLong
long compareAndSwapLong(WordBase offset, long expectedValue, long newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
- The value that was read for comparison, which is
expectedValue
if the exchange was performed. - Since:
- 19.0
-
compareAndSwapWord
<T extends WordBase> T compareAndSwapWord(WordBase offset, T expectedValue, T newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
- The value that was read for comparison, which is
expectedValue
if the exchange was performed. - Since:
- 19.0
-
compareAndSwapObject
Object compareAndSwapObject(WordBase offset, Object expectedValue, Object newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
- The value that was read for comparison, which is
expectedValue
if the exchange was performed. - Since:
- 19.0
-
logicCompareAndSwapInt
boolean logicCompareAndSwapInt(WordBase offset, int expectedValue, int newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
true
if successful. False return indicates that the actual value was not equal to the expected value.- Since:
- 19.0
-
logicCompareAndSwapLong
boolean logicCompareAndSwapLong(WordBase offset, long expectedValue, long newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
true
if successful. False return indicates that the actual value was not equal to the expected value.- Since:
- 19.0
-
logicCompareAndSwapWord
boolean logicCompareAndSwapWord(WordBase offset, WordBase expectedValue, WordBase newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
true
if successful. False return indicates that the actual value was not equal to the expected value.- Since:
- 19.0
-
logicCompareAndSwapObject
boolean logicCompareAndSwapObject(WordBase offset, Object expectedValue, Object newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.The offset is always treated as a
SignedWord
value. However, the static type isWordBase
to avoid the frequent casts ofUnsignedWord
values (where the caller knows that the highest-order bit of the unsigned value is never used).- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
true
if successful. False return indicates that the actual value was not equal to the expected value.- Since:
- 19.0
-
writeByte
void writeByte(int offset, byte val) Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeChar
void writeChar(int offset, char val) Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeShort
void writeShort(int offset, short val) Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeInt
void writeInt(int offset, int val) Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeLong
void writeLong(int offset, long val) Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeFloat
void writeFloat(int offset, float val) Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeDouble
void writeDouble(int offset, double val) Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeWord
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeObject
Writes the memory at address(this + offset)
. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
writeWordVolatile
Writes the memory at address(this + offset)
in accordance with the volatile semantics. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessval
- the value to be written to memory- Since:
- 19.0
-
compareAndSwapInt
int compareAndSwapInt(int offset, int expectedValue, int newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
- The value that was read for comparison, which is
expectedValue
if the exchange was performed. - Since:
- 19.0
-
compareAndSwapLong
long compareAndSwapLong(int offset, long expectedValue, long newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
- The value that was read for comparison, which is
expectedValue
if the exchange was performed. - Since:
- 19.0
-
compareAndSwapWord
<T extends WordBase> T compareAndSwapWord(int offset, T expectedValue, T newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
- The value that was read for comparison, which is
expectedValue
if the exchange was performed. - Since:
- 19.0
-
compareAndSwapObject
Object compareAndSwapObject(int offset, Object expectedValue, Object newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
- The value that was read for comparison, which is
expectedValue
if the exchange was performed. - Since:
- 19.0
-
logicCompareAndSwapInt
boolean logicCompareAndSwapInt(int offset, int expectedValue, int newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
true
if successful. False return indicates that the actual value was not equal to the expected value.- Since:
- 19.0
-
logicCompareAndSwapLong
boolean logicCompareAndSwapLong(int offset, long expectedValue, long newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
true
if successful. False return indicates that the actual value was not equal to the expected value.- Since:
- 19.0
-
logicCompareAndSwapWord
boolean logicCompareAndSwapWord(int offset, WordBase expectedValue, WordBase newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
true
if successful. False return indicates that the actual value was not equal to the expected value.- Since:
- 19.0
-
logicCompareAndSwapObject
boolean logicCompareAndSwapObject(int offset, Object expectedValue, Object newValue, LocationIdentity locationIdentity) In a single atomic step, compares the memory at address(this + offset)
to the expected value, and if equal, exchanges it for the new value. Both the base address and offset are in bytes.- Parameters:
offset
- the signed offset for the memory accessexpectedValue
- the expected current value at the memory addressnewValue
- the new value for the atomic exchangelocationIdentity
- the identity of the memory location- Returns:
true
if successful. False return indicates that the actual value was not equal to the expected value.- Since:
- 19.0
-
add
Returns a Pointer whose value is(this + val)
.- Specified by:
add
in interfaceUnsignedWord
- Parameters:
val
- value to be added to this Pointer.- Returns:
this + val
- Since:
- 19.0
-
add
Returns a Pointer whose value is(this + val)
.- Specified by:
add
in interfaceUnsignedWord
- Parameters:
val
- value to be added to this Pointer.- Returns:
this + val
- Since:
- 19.0
-
subtract
Returns a Pointer whose value is(this - val)
.- Specified by:
subtract
in interfaceUnsignedWord
- Parameters:
val
- value to be subtracted from this Pointer.- Returns:
this - val
- Since:
- 19.0
-
subtract
Returns a Pointer whose value is(this - val)
.- Specified by:
subtract
in interfaceUnsignedWord
- Parameters:
val
- value to be subtracted from this Pointer.- Returns:
this - val
- Since:
- 19.0
-
and
Returns a Pointer whose value is(this & val)
.- Specified by:
and
in interfaceUnsignedWord
- Parameters:
val
- value to be AND'ed with this Pointer.- Returns:
this & val
- Since:
- 19.0
-
and
Returns a Pointer whose value is(this & val)
.- Specified by:
and
in interfaceUnsignedWord
- Parameters:
val
- value to be AND'ed with this Pointer.- Returns:
this & val
- Since:
- 19.0
-
or
Returns a Pointer whose value is(this | val)
.- Specified by:
or
in interfaceUnsignedWord
- Parameters:
val
- value to be OR'ed with this Pointer.- Returns:
this | val
- Since:
- 19.0
-
or
Returns a Pointer whose value is(this | val)
.- Specified by:
or
in interfaceUnsignedWord
- Parameters:
val
- value to be OR'ed with this Pointer.- Returns:
this | val
- Since:
- 19.0
-