MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / get_bytes_array

Method get_bytes_array

os/src/mm/address.rs:175–178  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

173 unsafe { core::slice::from_raw_parts_mut(pa.0 as *mut PageTableEntry, 512) }
174 }
175 pub fn get_bytes_array(&self) -> &'static mut [u8] {
176 let pa: PhysAddr = (*self).into();
177 unsafe { core::slice::from_raw_parts_mut(pa.0 as *mut u8, 4096) }
178 }
179 pub fn get_mut<T>(&self) -> &'static mut T {
180 let pa: PhysAddr = (*self).into();
181 pa.get_mut()

Callers 4

from_existed_userMethod · 0.80
copy_dataMethod · 0.80
newMethod · 0.80
translated_byte_bufferFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected