MCPcopy Create free account
hub / github.com/Starry-OS/StarryOS / get_as_mut_slice

Method get_as_mut_slice

api/src/mm.rs:135–142  ·  view source on GitHub ↗
(self, len: usize)

Source from the content-addressed store, hash-verified

133 }
134
135 pub fn get_as_mut_slice(self, len: usize) -> AxResult<&'static mut [T]> {
136 check_region(
137 self.address(),
138 Layout::array::<T>(len).unwrap(),
139 Self::ACCESS_FLAGS,
140 )?;
141 Ok(unsafe { slice::from_raw_parts_mut(self.0, len) })
142 }
143
144 pub fn get_as_mut_null_terminated(self) -> AxResult<&'static mut [T]>
145 where

Callers 9

fill_addrFunction · 0.80
get_event_bitsMethod · 0.80
return_strFunction · 0.80
return_zero_bitsFunction · 0.80
ioctlMethod · 0.80
pushMethod · 0.80
do_epoll_waitFunction · 0.80
sys_pollFunction · 0.80
sys_ppollFunction · 0.80

Calls 2

check_regionFunction · 0.85
addressMethod · 0.80

Tested by

no test coverage detected