pub struct PageHandle {
pub ptr: *mut u8,
pub len: usize,
pub cap: usize,
}Fields§
§ptr: *mut u8§len: usize§cap: usizeImplementations§
Source§impl PageHandle
impl PageHandle
Source§impl PageHandle
impl PageHandle
Sourcepub fn new(size: usize, page_size: PageSize) -> Self
pub fn new(size: usize, page_size: PageSize) -> Self
Examples found in repository?
examples/page_addr.rs (line 5)
3fn main() {
4 let page_size = PageSize::from_system();
5 let r = PageHandle::new(64000_usize, page_size);
6 println!("{:p}", r.ptr);
7 let r = PageHandle::new(64000_usize, page_size);
8 println!("{:p}", r.ptr);
9 let r = PageHandle::new(64000_usize, page_size);
10 println!("{:p}", r.ptr);
11 println!();
12 let mut rs = vec![];
13 for _ in 0..3 {
14 let r = PageHandle::new(64000_usize, page_size);
15 // println!("{:p}", r.ptr);
16 rs.push(r);
17 }
18 for i in rs {
19 println!("{:p}", i.ptr);
20 }
21}pub fn make_page_executable(&self)
Trait Implementations§
Source§impl Clone for PageHandle
impl Clone for PageHandle
Source§fn clone(&self) -> PageHandle
fn clone(&self) -> PageHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PageHandle
impl Debug for PageHandle
Source§impl Drop for PageHandle
Available on Unix only.
impl Drop for PageHandle
Available on Unix only.
impl Eq for PageHandle
Source§impl PartialEq for PageHandle
impl PartialEq for PageHandle
impl StructuralPartialEq for PageHandle
Auto Trait Implementations§
impl !Send for PageHandle
impl !Sync for PageHandle
impl Freeze for PageHandle
impl RefUnwindSafe for PageHandle
impl Unpin for PageHandle
impl UnsafeUnpin for PageHandle
impl UnwindSafe for PageHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more