28#ifndef INCLUDED_SYSDEP_VM
29#define INCLUDED_SYSDEP_VM
100bool Decommit(uintptr_t address,
size_t size);
111bool Protect(uintptr_t address,
size_t size,
int prot);
134void Free(
void* p,
size_t size = 0);
static const size_t g_LargePageSize
Definition: alignment.h:97
void Free(void *p, size_t size)
decommit memory and release address space.
Definition: uvm.cpp:113
bool Decommit(uintptr_t address, size_t size)
unmap physical memory.
Definition: uvm.cpp:77
void EndOnDemandCommits()
decrements the reference count begun by BeginOnDemandCommit and removes the page fault handler when i...
Definition: uvm.cpp:125
void * Allocate(size_t size, PageType pageType, int prot)
reserve address space and commit memory.
Definition: uvm.cpp:98
void ReleaseAddressSpace(void *p, size_t size)
release address space and decommit any memory.
Definition: uvm.cpp:49
bool Commit(uintptr_t address, size_t size, PageType pageType, int prot)
map physical memory to previously reserved address space.
Definition: uvm.cpp:59
bool Protect(uintptr_t address, size_t size, int prot)
set the memory protection flags for all pages that intersect the given interval.
Definition: uvm.cpp:86
void BeginOnDemandCommits()
install a handler that attempts to commit memory whenever a read/write page fault is encountered.
Definition: uvm.cpp:120
PageType
Definition: vm.h:43
@ kDefault
Definition: vm.h:46
@ kSmall
Definition: vm.h:45
@ kLarge
Definition: vm.h:44
void * ReserveAddressSpace(size_t size, size_t commitSize, PageType pageType, int prot)
reserve address space and set the parameters for any later on-demand commits.
Definition: uvm.cpp:40
void DumpStatistics()
Definition: uvm.cpp:131
#define PROT_READ
Definition: wmman.h:32
#define PROT_WRITE
Definition: wmman.h:33