MOS Source Code
Loading...
Searching...
No Matches
mmap.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2
3#pragma once
4
5#include "mos/mm/mm_types.hpp"
6
9#include <mos/types.hpp>
10
12
23ptr_t mmap_anonymous(MMContext *ctx, ptr_t hint_addr, MMapFlags flags, VMFlags VMFlags, size_t n_pages);
24
37ptr_t mmap_file(MMContext *ctx, ptr_t hint_addr, MMapFlags flags, VMFlags VMFlags, size_t n_pages, IO *io, off_t offset);
38
49bool munmap(ptr_t addr, size_t size);
50
59bool vm_protect(MMContext *mmctx, ptr_t addr, size_t size, VMFlags perm);
mmap_flags_t
Definition mm_types.h:15
bool munmap(ptr_t addr, size_t size)
Unmap a page from the current process's address space.
Definition mmap.cpp:108
ptr_t mmap_file(MMContext *ctx, ptr_t hint_addr, MMapFlags flags, VMFlags VMFlags, size_t n_pages, IO *io, off_t offset)
Map a file into the current process's address space.
Definition mmap.cpp:71
ptr_t mmap_anonymous(MMContext *ctx, ptr_t hint_addr, MMapFlags flags, VMFlags VMFlags, size_t n_pages)
Map a page into the current process's address space.
Definition mmap.cpp:54
bool vm_protect(MMContext *mmctx, ptr_t addr, size_t size, VMFlags perm)
Change the permissions of a mapping.
Definition mmap.cpp:141
size_t size
Definition slab.cpp:32
Definition io.hpp:39
ssize_t off_t
Definition types.h:80
unsigned long ptr_t
Definition types.h:21
#define MOS_ENUM_FLAGS(enum, flags)
Definition types.hpp:236