Creates an memory mapping of a file.
impl MemMap {
fn file<F>(file: &F, at: u64, len: usize, protection: MemProtFlags, shared: bool, flags: MemMapFlags) -> Result<MemMap, Errno>
where F: FDContainer,
}| Name | Description |
|---|---|
| file | The file that will be mapped. |
| at | The position in the file at which the mapping starts. |
| len | The size of the mapping. |
| protection | The protection of the mapped region. |
| shared | Whether this mapping can be shared with other processes. |
| flags | Flags to use when creating this mapping. |
The real size of the mapping can be larger than the len argument.