Indirect the native pointer to malloc space, a la Pointer.setPointer . 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#setPointer
(long offset, Pointer value)
| 720 | * @see Pointer#setPointer |
| 721 | */ |
| 722 | @Override |
| 723 | public void setPointer(long offset, Pointer value) { |
| 724 | boundsCheck(offset, Native.POINTER_SIZE); |
| 725 | super.setPointer(offset, value); |
| 726 | } |
| 727 | |
| 728 | @Override |
| 729 | public void setString(long offset, String value, String encoding) { |