Function tikv_jemalloc_ctl::raw::read

source ·
pub unsafe fn read<T: Copy>(name: &[u8]) -> Result<T>
Expand description

Uses the null-terminated string name as key to the MALLCTL NAMESPACE and reads its value.

§Safety

This function is unsafe because it is possible to use it to construct an invalid T, for example, by passing T=bool for a key returning u8. The sizes of bool and u8 match, but bool cannot represent all values that u8 can.