MOS Source Code
Loading...
Searching...
No Matches
cow.h File Reference
#include "mos/mm/mm.h"
#include "mos/mm/paging/paging.h"
+ Include dependency graph for cow.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

vmap_tcow_clone_vmap_locked (mm_context_t *target_mmctx, vmap_t *source_vmap)
 Copy-on-write a page range.
 
vmap_tcow_allocate_zeroed_pages (mm_context_t *handle, size_t npages, ptr_t vaddr, valloc_flags hints, vm_flags flags)
 Allocate zero-on-demand pages at a specific address.
 

Function Documentation

◆ cow_clone_vmap_locked()

vmap_t * cow_clone_vmap_locked ( mm_context_t * target_mmctx,
vmap_t * source_vmap )

Copy-on-write a page range.

Parameters
target_mmctxThe mm context to copy to
source_vmapThe vmap to copy from
Returns
vmap_t* The new vmap, with the lock held

Definition at line 62 of file cow.c.

Referenced by process_do_fork().

+ Here is the call graph for this function:

◆ cow_allocate_zeroed_pages()

vmap_t * cow_allocate_zeroed_pages ( mm_context_t * handle,
size_t npages,
ptr_t vaddr,
valloc_flags hints,
vm_flags flags )

Allocate zero-on-demand pages at a specific address.

Parameters
handleThe paging handle to use
npagesThe number of pages to allocate
vaddrThe virtual address to allocate at
hintsAllocation hints, see valloc_flags
flagsVM flags to use
Returns
vmblock_t The allocated block

Definition at line 79 of file cow.c.

Referenced by mmap_anonymous(), process_do_execveat(), and thread_new().

+ Here is the call graph for this function: