You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pub unsafe fn update<T>(name: &[u8], mut value: T) -> Result<T> {
validate_name(name);
let mut len = mem::size_of::<T>();
cvt(jemalloc_sys::mallctl(
name as *const _ as *const c_char,
&mut value as *mut _ as *mut _,
&mut len,
&mut value as *mut _ as *mut _,
len,
))?;
assert_eq!(len, mem::size_of::<T>());
Ok(value)
}
This is not supported by jemalloc, and as a result, the update function does not actually work in many cases. For example, jemalloc_ctl::background_thread.update(true).unwrap() does not actually turn on background threads.
The out pointer oldp and the new value passed in newp must be different pointers.
The text was updated successfully, but these errors were encountered:
The same pointer is used for
oldp
andnewp
:This is not supported by jemalloc, and as a result, the
update
function does not actually work in many cases. For example,jemalloc_ctl::background_thread.update(true).unwrap()
does not actually turn on background threads.The out pointer
oldp
and the new value passed innewp
must be different pointers.The text was updated successfully, but these errors were encountered: