pub unsafe fn zeropage(&self, start: *mut c_void, len: usize, wake: bool) -> Result<usize> {
        let mut zeropage = raw::uffdio_zeropage {
            range: raw::uffdio_range {
                start: start as u64,
                len: len as u64,
            },
            mode: if wake {
                0
            } else {
                raw::UFFDIO_ZEROPAGE_MODE_DONTWAKE
            },
            zeropage: 0,
        };

        let _ = raw::zeropage(self.as_raw_fd(), &mut zeropage as &mut raw::uffdio_zeropage)
            .map_err(Error::ZeropageFailed)?;
        if zeropage.zeropage < 0 {
            // shouldn't ever get here, as errno should be caught above
            Err(Error::ZeropageFailed(Errno::from_i32(
                -zeropage.zeropage as i32,
            )))
        } else {
            Ok(zeropage.zeropage as usize)
        }
    }
/// Zero out a memory address range registered with userfaultfd, and return the number of bytes
/// that were successfully zeroed.
///
/// If `wake` is `true`, wake up the thread waiting for page fault resolution on the memory
/// address range.
Zero out a memory address range registered with userfaultfd, and return the number of bytes
that were successfully zeroed.

If `wake` is `true`, wake up the thread waiting for page fault resolution on the memory
address range.
Zero out a memory address range registered with userfaultfd and return the number of bytes that were successfully zeroed . If ` wake ` is ` true ` wake up the thread waiting for page fault resolution on the memory address range .
pub unsafe fn zeropage(&self, start: *mut c_void, len: usize, wake: bool) -> Result<usize> {
        let mut zeropage = raw::uffdio_zeropage {
            range: raw::uffdio_range {
                start: start as u64,
                len: len as u64,
            },
            mode: if wake {
                0
            } else {
                raw::UFFDIO_ZEROPAGE_MODE_DONTWAKE
            },
            zeropage: 0,
        };
        let _ = raw::zeropage(self.as_raw_fd(), &mut zeropage as &mut raw::uffdio_zeropage)
            .map_err(Error::ZeropageFailed)?;
        if zeropage.zeropage < 0 {
            // shouldn't ever get here, as errno should be caught above
            Err(Error::ZeropageFailed(Errno::from_i32(
                -zeropage.zeropage as i32,
            )))
        } else {
            Ok(zeropage.zeropage as usize)
        }
    }
pub unsafe fn zeropage ( & self , start : * mut c_void , len : usize , wake : bool ) -> Result < usize > { let mut zeropage = raw :: uffdio_zeropage { range : raw :: uffdio_range { start : start as u64 , len : len as u64 , } , mode : if wake { 0 } else { raw :: UFFDIO_ZEROPAGE_MODE_DONTWAKE } , zeropage : 0 , } ; let _ = raw :: zeropage ( self . as_raw_fd ( ) , & mut zeropage as & mut raw :: uffdio_zeropage ) . map_err ( Error :: ZeropageFailed ) ? ; if zeropage . zeropage < 0 { // shouldn't ever get here, as errno should be caught above Err ( Error :: ZeropageFailed ( Errno :: from_i32 ( - zeropage . zeropage as i32 , ) ) ) } else { Ok ( zeropage . zeropage as usize ) } }
Zero out a memory address range registered with userfaultfd, and return the number of bytes
that were successfully zeroed.
Zero out a memory address range registered with userfaultfd and return the number of bytes that were successfully zeroed .
&self
start
*mut c_void
len
usize
wake
bool