crabgrind 0.2.5

Rust bindings to "Valgrind Client Request" interface
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![doc = include_str!("../../doc/dhat.md")]
use super::{client_request, constants::dhat::AD_HOC_EVENT_DEFAULT_WEIGHT};
use crate::bindings::CG_DHATClientRequest as CR;
use core::ffi::c_void;

#[doc = include_str!("../../doc/dhat/ad_hoc_event.md")]
#[inline(always)]
pub fn ad_hoc_event(weight: impl Into<Option<usize>>) {
    client_request!(CR::CG_DHAT_AD_HOC_EVENT, weight.into().unwrap_or(AD_HOC_EVENT_DEFAULT_WEIGHT));
}

#[doc = include_str!("../../doc/dhat/histogram_memory.md")]
#[inline(always)]
pub fn histogram_memory(addr: *const c_void) {
    client_request!(CR::CG_DHAT_HISTOGRAM_MEMORY, addr);
}