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

Function mremap

src/backend/linux_raw/mm/syscalls.rs:141–154  ·  view source on GitHub ↗
(
    old_address: *mut c_void,
    old_size: usize,
    new_size: usize,
    flags: MremapFlags,
)

Source from the content-addressed store, hash-verified

139/// anything working with memory pointed to by raw pointers is unsafe.
140#[inline]
141pub(crate) unsafe fn mremap(
142 old_address: *mut c_void,
143 old_size: usize,
144 new_size: usize,
145 flags: MremapFlags,
146) -> io::Result<*mut c_void> {
147 ret_void_star(syscall!(
148 __NR_mremap,
149 old_address,
150 pass_usize(old_size),
151 pass_usize(new_size),
152 flags
153 ))
154}
155
156/// # Safety
157///

Callers

nothing calls this directly

Calls 1

ret_void_starFunction · 0.85

Tested by

no test coverage detected