MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / set_virtual_memory_region_name

Function set_virtual_memory_region_name

src/process/prctl.rs:1156–1167  ·  view source on GitHub ↗
(region: &[u8], name: Option<&CStr>)

Source from the content-addressed store, hash-verified

1154#[doc(alias = "PR_SET_VMA")]
1155#[doc(alias = "PR_SET_VMA_ANON_NAME")]
1156pub fn set_virtual_memory_region_name(region: &[u8], name: Option<&CStr>) -> io::Result<()> {
1157 unsafe {
1158 syscalls::prctl(
1159 PR_SET_VMA,
1160 PR_SET_VMA_ANON_NAME as *mut _,
1161 region.as_ptr() as *mut _,
1162 region.len() as *mut _,
1163 name.map_or_else(null, CStr::as_ptr) as *mut _,
1164 )
1165 .map(|_r| ())
1166 }
1167}

Callers

nothing calls this directly

Calls 3

prctlFunction · 0.50
as_ptrMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected