use crate::mem::{Advice, MapOptions, Protection, Sharing};
use crate::{BorrowedHandle, ErrorKind, OwnedHandle, Result};
const PAGE_SIZE: usize = 1 << 16;
pub(crate) fn page_size() -> usize {
PAGE_SIZE
}
pub(crate) fn allocation_granularity() -> usize {
PAGE_SIZE
}
fn unsupported<T>() -> Result<T> {
Err(ErrorKind::Unsupported.into())
}
pub(crate) fn map_anonymous(_len: usize, _options: &MapOptions) -> Result<*mut u8> {
unsupported()
}
pub(crate) fn map_file(
_file: BorrowedHandle<'_>,
_offset: u64,
_len: usize,
_sharing: Sharing,
_options: &MapOptions,
) -> Result<*mut u8> {
unsupported()
}
pub(crate) fn reserve(_len: usize, _options: &MapOptions, _placeholder: bool) -> Result<*mut u8> {
unsupported()
}
pub(crate) unsafe fn unmap(_ptr: *mut u8, _len: usize) -> Result<()> {
unsupported()
}
pub(crate) unsafe fn protect(_ptr: *mut u8, _len: usize, _protection: Protection) -> Result<()> {
unsupported()
}
pub(crate) unsafe fn commit(_ptr: *mut u8, _len: usize, _protection: Protection) -> Result<()> {
unsupported()
}
pub(crate) unsafe fn decommit(_ptr: *mut u8, _len: usize) -> Result<()> {
unsupported()
}
pub(crate) unsafe fn advise(_ptr: *mut u8, _len: usize, _advice: Advice) -> Result<()> {
unsupported()
}
pub(crate) fn flush(_ptr: *const u8, _len: usize, _file: BorrowedHandle<'_>) -> Result<()> {
unsupported()
}
pub(crate) fn lock(_ptr: *const u8, _len: usize) -> Result<()> {
unsupported()
}
pub(crate) fn unlock(_ptr: *const u8, _len: usize) -> Result<()> {
unsupported()
}
pub(crate) unsafe fn flush_instruction_cache(_ptr: *const u8, _len: usize) -> Result<()> {
unsupported()
}
pub(crate) fn create_shared(_len: usize) -> Result<OwnedHandle> {
unsupported()
}