![]() |
MOS Source Code
|
#include "mos/mm/cow.hpp"#include "mos/mm/mm.hpp"#include "mos/mm/mmstat.hpp"#include "mos/mm/paging/paging.hpp"#include "mos/platform/platform.hpp"#include <mos/interrupt/ipi.hpp>#include <mos/mm/physical/pmm.hpp>#include <mos/syslog/printk.hpp>#include <mos/tasks/process.hpp>#include <mos/tasks/task_types.hpp>#include <mos/types.hpp>#include <mos_string.hpp>Go to the source code of this file.
Functions | |
| static phyframe_t * | zero_page (void) |
| static vmfault_result_t | cow_zod_fault_handler (vmap_t *vmap, ptr_t fault_addr, pagefault_t *info) |
| PtrResult< vmap_t > | cow_clone_vmap_locked (MMContext *target_mmctx, vmap_t *src_vmap) |
| Copy-on-write a page range. | |
| PtrResult< vmap_t > | cow_allocate_zeroed_pages (MMContext *mmctx, size_t npages, ptr_t vaddr, VMFlags flags, bool exact) |
| Allocate zero-on-demand pages at a specific address. | |
Variables | |
| static phyframe_t * | _zero_page = NULL |
|
static |
Definition at line 22 of file cow.cpp.
Referenced by cow_zod_fault_handler().
|
static |
Definition at line 34 of file cow.cpp.
Referenced by cow_allocate_zeroed_pages(), and cow_clone_vmap_locked().
Copy-on-write a page range.
| target_mmctx | The mm context to copy to |
| source_vmap | The vmap to copy from |
Definition at line 62 of file cow.cpp.
Referenced by process_do_fork().
| PtrResult< vmap_t > cow_allocate_zeroed_pages | ( | MMContext * | handle, |
| size_t | npages, | ||
| ptr_t | vaddr, | ||
| VMFlags | flags, | ||
| bool | exact = false ) |
Allocate zero-on-demand pages at a specific address.
| handle | The paging handle to use |
| npages | The number of pages to allocate |
| vaddr | The virtual address to allocate at |
| flags | VM flags to use |
| exact | Allocation at the exact address |
Definition at line 81 of file cow.cpp.
Referenced by mmap_anonymous(), process_do_execveat(), and thread_new().
|
static |
Definition at line 21 of file cow.cpp.
Referenced by zero_page().