iai_callgrind::client_requests::memcheck

Function set_vbits

source
pub fn set_vbits(addr: *const (), bits: &[u8], len: usize) -> usize
Available on crate feature client_requests_defs only.
Expand description

Allow you to set the V (validity) bits for an address range [addr...addr+len-1]

The validity data is copied from the provided bits slice.

Return values:

  • 0 if not running on valgrind
  • 1 success
  • 2 [previously indicated unaligned arrays; these are now allowed]
  • 3 if any parts of addr/bits are not addressable.

The metadata is not copied in cases 0, 2 or 3, so it should be impossible to segfault your system by using this call.

You should probably only set V bits with set_vbits that you have got with get_vbits.

Only for those who really know what they are doing.