MCPcopy Create free account
hub / github.com/java-native-access/jna / getPointer

Method getPointer

src/com/sun/jna/Memory.java:570–574  ·  view source on GitHub ↗

Indirect the native pointer to malloc space, a la Pointer.getPointer . But this method performs a bounds checks to ensure that the indirection does not cause memory outside the malloc ed space to be accessed. @see Pointer#getPointer(long)

(long offset)

Source from the content-addressed store, hash-verified

568 * @see Pointer#getPointer(long)
569 */
570 @Override
571 public Pointer getPointer(long offset) {
572 boundsCheck(offset, Native.POINTER_SIZE);
573 return shareReferenceIfInBounds(super.getPointer(offset));
574 }
575
576 /**
577 * Get a ByteBuffer mapped to a portion of this memory.

Callers 4

loadStringMethod · 0.95
testSetNativeMappedMethod · 0.95
testGetSharedMemoryMethod · 0.95
testAccessViolationMethod · 0.95

Calls 3

boundsCheckMethod · 0.95
getPointerMethod · 0.65

Tested by 3

testSetNativeMappedMethod · 0.76
testGetSharedMemoryMethod · 0.76
testAccessViolationMethod · 0.76