Indirect the native pointer to malloc space, a la Pointer.setByte . 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#setByte
(long offset, byte value)
| 622 | * @see Pointer#setByte |
| 623 | */ |
| 624 | @Override |
| 625 | public void setByte(long offset, byte value) { |
| 626 | boundsCheck(offset, 1); |
| 627 | super.setByte(offset, value); |
| 628 | } |
| 629 | |
| 630 | /** |
| 631 | * Indirect the native pointer to <code>malloc</code> space, a la |