iai_callgrind::client_requests::memcheck

Function get_vbits

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

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

The validity data is copied into 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 this client request.

Only for those who really know what they are doing.