iai_callgrind::client_requests::valgrind

Function freelike_block

source
pub fn freelike_block(addr: *const (), redzone: usize)
Available on crate feature client_requests_defs only.
Expand description

freelike_block is the partner to malloclike_block. For Memcheck, it does two things:

The following description is taken almost untouched from the docs in the valgrind.h header file.

  • It records that the block has been deallocated. This assumes that the block was annotated as having been allocated via malloclike_block. Otherwise, an error will be issued.
  • It marks the block as being unaddressable.

freelike_block should be put immediately after the point where a heap block is deallocated.

See also malloclike_block for more details