MOS Source Code
Loading...
Searching...
No Matches
mmap.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#pragma once
4
6
9#include <mos/types.h>
10
21ptr_t mmap_anonymous(mm_context_t *ctx, ptr_t hint_addr, mmap_flags_t flags, vm_flags vm_flags, size_t n_pages);
22
35ptr_t mmap_file(mm_context_t *ctx, ptr_t hint_addr, mmap_flags_t flags, vm_flags vm_flags, size_t n_pages, io_t *io, off_t offset);
36
47bool munmap(ptr_t addr, size_t size);
48
57bool vm_protect(mm_context_t *mmctx, ptr_t addr, size_t size, vm_flags perm);
mmap_flags_t
Definition mm_types.h:15
ptr_t mmap_file(mm_context_t *ctx, ptr_t hint_addr, mmap_flags_t flags, vm_flags vm_flags, size_t n_pages, io_t *io, off_t offset)
Map a file into the current process's address space.
Definition mmap.c:73
bool munmap(ptr_t addr, size_t size)
Unmap a page from the current process's address space.
Definition mmap.c:111
ptr_t mmap_anonymous(mm_context_t *ctx, ptr_t hint_addr, mmap_flags_t flags, vm_flags vm_flags, size_t n_pages)
Map a page into the current process's address space.
Definition mmap.c:54
bool vm_protect(mm_context_t *mmctx, ptr_t addr, size_t size, vm_flags perm)
Change the permissions of a mapping.
Definition mmap.c:144
vm_flags
Definition platform.h:40
size_t size
Definition slab.c:30
Definition io.h:46
ssize_t off_t
Definition types.h:84
unsigned long ptr_t
Definition types.h:25