Pyrogenesis  trunk
Namespaces | Enumerations | Functions
vm.h File Reference
#include "lib/posix/posix_mman.h"
Include dependency graph for vm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 vm
 

Enumerations

enum  vm::PageType { vm::kLarge, vm::kSmall, vm::kDefault }
 

Functions

void * vm::ReserveAddressSpace (size_t size, size_t commitSize=largePageSize, PageType pageType=kDefault, int prot=PROT_READ|PROT_WRITE)
 reserve address space and set the parameters for any later on-demand commits. More...
 
void vm::ReleaseAddressSpace (void *p, size_t size=0)
 release address space and decommit any memory. More...
 
bool vm::Commit (uintptr_t address, size_t size, PageType pageType=kDefault, int prot=PROT_READ|PROT_WRITE)
 map physical memory to previously reserved address space. More...
 
bool vm::Decommit (uintptr_t address, size_t size)
 unmap physical memory. More...
 
bool vm::Protect (uintptr_t address, size_t size, int prot)
 set the memory protection flags for all pages that intersect the given interval. More...
 
void * vm::Allocate (size_t size, PageType pageType=kDefault, int prot=PROT_READ|PROT_WRITE)
 reserve address space and commit memory. More...
 
void vm::Free (void *p, size_t size=0)
 decommit memory and release address space. More...
 
void vm::BeginOnDemandCommits ()
 install a handler that attempts to commit memory whenever a read/write page fault is encountered. More...
 
void vm::EndOnDemandCommits ()
 decrements the reference count begun by BeginOnDemandCommit and removes the page fault handler when it reaches 0. More...
 
void vm::DumpStatistics ()