pub fn raw_memfd(memfd: &mfd::Memfd) -> Result<mmap::MmapRaw, Error> {
    // The file can be truncated; no safe memory mapping.
    verify_seal(&memfd, mfd::FileSeal::SealShrink)?;

    // If the file has been sealed as read-only, the below will fail.
    // If the file later is trying to be sealed as read-only, that call will fail and
    // our mapping will remain.

    let r = mmap::MmapOptions::new().map_raw(memfd.as_file())?;
    Ok(r)
}
/// Creates a raw memory map of a memfd, suitable for IPC. It must be writable.
Creates a raw memory map of a memfd, suitable for IPC. It must be writable.
Creates a raw memory map of a memfd suitable for IPC . It must be writable .
pub fn raw_memfd(memfd: &mfd::Memfd) -> Result<mmap::MmapRaw, Error> {
    // The file can be truncated; no safe memory mapping.
    verify_seal(&memfd, mfd::FileSeal::SealShrink)?;
    // If the file has been sealed as read-only, the below will fail.
    // If the file later is trying to be sealed as read-only, that call will fail and
    // our mapping will remain.
    let r = mmap::MmapOptions::new().map_raw(memfd.as_file())?;
    Ok(r)
}
pub fn raw_memfd ( memfd : & mfd :: Memfd ) -> Result < mmap :: MmapRaw , Error > { // The file can be truncated; no safe memory mapping. verify_seal ( & memfd , mfd :: FileSeal :: SealShrink ) ? ; // If the file has been sealed as read-only, the below will fail. // If the file later is trying to be sealed as read-only, that call will fail and // our mapping will remain. let r = mmap :: MmapOptions :: new ( ) . map_raw ( memfd . as_file ( ) ) ? ; Ok ( r ) }
Creates a raw memory map of a memfd, suitable for IPC.
Creates a raw memory map of a memfd suitable for IPC .
memfd
&mfd::Memfd
memfd
&mfd::Memfd