VirtualMemory

Manages mapping of virtual memory pages.

Summary
VirtualMemoryManages mapping of virtual memory pages.
CopyrightThis program is free software.
Files
C-kern/api/memory/vm.hHeader file of VirtualMemory.
C-kern/platform/Linux/vm.cLinux specific implementation VirtualMemory Linux.
Types
struct vmpage_tExports vmpage_t into global namespace.
struct vm_region_tExports vm_region_t, describes a single virtual memory region.
struct vm_mappedregions_tExports vm_mappedregions_t, description of all mapped memory.
struct vm_regionsarray_tInternal type used by vm_mappedregions_t.
Functions
query
log2pagesize_vmReturns log2_int of pagesize_vm.
pagesize_vmReturns the virtual memory page size supported by the underlying system.
sizephysram_vmReturns size of all physical memory in bytes.
sizeavailableram_vmReturns size of available physical memory in bytes
sys_pagesize_vmReturns the virtual memory page size supported by the underlying system.
ismapped_vmReturns true is vmpage is mapped whose accessmode equals protection.
isunmapped_vmReturns true if memory at vmpage is not mapped.
test
unittest_platform_vmUnittest for virtual memory module.
vmpage_tType has same structure as memblock_t.
addrPoints to start (lowest) address of memory.
sizeSize of memory in bytes addr points to.
lifetime
vmpage_FREEStatic initializer.
vmpage_INITStatic initializer.
init_vmpageMap memory into the virtual address space of the calling process.
init2_vmpageMap memory into the virtual address space of the calling process.
initaligned_vmpageMap new memory into the virtual address space of the calling process.
free_vmpageInvalidates virtual memory address range
query
isfree_vmpageReturns true if vmpage equals vmpage_FREE.
change
protect_vmpageSets protection of memory (e.g.
tryexpand_vmpageTries to grow the upper bound of an already mapped address range.
movexpand_vmpageGrows an already mapped virtual memory block.
shrink_vmpageShrinks the size of an already mapped virtual memory block.
genericcast_vmpageCasts a pointer to an compatible object into pointer to vmpage_t.
vm_region_tReturns information about a mapped memory region and its access permissions.
addrStart address or lowest address of mapping.
endaddrEnd address of mapping.
protectionGives protection (access rights) of the memory block.
query
compare_vmregionReturns 0 if left and right regions compare equal.
vm_mappedregions_tBuffer which stores a snapshot of all mapped memory regions.
private variables
total_countNumber of stored elements of type vm_region_t.
element_countNumber of elements element_iterator can access in sequence.
element_iteratorPoints to an array of vm_region_t of size element_count.
array_iteratorPoints to next array of vm_region_t which comes after array element_iterator points to.
first_arrayPoints to first array of vm_region_t.
lifetime
vm_mappedregions_FREEStatic initializer: Makes calling free_vmmappedregions safe.
init_vmmappedregionsReturns in mappedregions the descriptions of all current virtual memory mappings.
free_vmmappedregionsFree internal memory cache used to store all vm_region_t objects.
query
size_vmmappedregionsReturns the total number of contained vm_region_t.
compare_vmmappedregionsReturns 0 if all regions stored in left and right container compare equal.
ismapped_vmmappedregionsReturns true if mappedregions contains a memory region with correct protection.
isunmapped_vmmappedregionsReturns true if mappedregions contains no memory region which overlaps with mblock.
iterate
gofirst_vmmappedregionsResets iterator to the first element.
next_vmmappedregionsReturns the next vm_region_t in the set of all stored elements.
inline implementation
Macros
genericcast_vmpageImplements vmpage_t.genericcast_vmpage.
init_vmpageImplements vmpage_t.init_vmpage.
isfree_vmpageImplements <vmpage_t.isfree_vmpage>>.
log2pagesize_vmUses cached value from valuecache_maincontext.
pagesize_vmUses cached value from valuecache_maincontext.
size_vmmappedregionsReturns vm_mappedregions_t->total_count.

Copyright

This program is free software.  You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Author

© 2011 Jörg Seebohn

Files

C-kern/api/memory/vm.h

Header file of VirtualMemory.

C-kern/platform/Linux/vm.c

Linux specific implementation VirtualMemory Linux.

Types

struct vmpage_t

typedef struct vmpage_t vmpage_t

Exports vmpage_t into global namespace.

struct vm_region_t

typedef struct vm_region_t vm_region_t

Exports vm_region_t, describes a single virtual memory region.

struct vm_mappedregions_t

typedef struct vm_mappedregions_t vm_mappedregions_t

Exports vm_mappedregions_t, description of all mapped memory.

struct vm_regionsarray_t

typedef struct vm_regionsarray_t vm_regionsarray_t

Internal type used by vm_mappedregions_t.

Functions

Summary
query
log2pagesize_vmReturns log2_int of pagesize_vm.
pagesize_vmReturns the virtual memory page size supported by the underlying system.
sizephysram_vmReturns size of all physical memory in bytes.
sizeavailableram_vmReturns size of available physical memory in bytes
sys_pagesize_vmReturns the virtual memory page size supported by the underlying system.
ismapped_vmReturns true is vmpage is mapped whose accessmode equals protection.
isunmapped_vmReturns true if memory at vmpage is not mapped.
test
unittest_platform_vmUnittest for virtual memory module.

query

log2pagesize_vm

uint8_t log2pagesize_vm(void)

Returns log2_int of pagesize_vm.

pagesize_vm

uint32_t pagesize_vm(void)

Returns the virtual memory page size supported by the underlying system.  This function returns a cached value >= 256.

sizephysram_vm

ramsize_t sizephysram_vm(void)

Returns size of all physical memory in bytes.

sizeavailableram_vm

ramsize_t sizeavailableram_vm(void)

Returns size of available physical memory in bytes

sys_pagesize_vm

uint32_t sys_pagesize_vm(void)

Returns the virtual memory page size supported by the underlying system.  This functions always calls the underlying system function.  The returned value is a power of two.

ismapped_vm

bool ismapped_vm(const vmpage_t *vmpage,
accessmode_e protection)

Returns true is vmpage is mapped whose accessmode equals protection.

isunmapped_vm

bool isunmapped_vm(const vmpage_t *vmpage)

Returns true if memory at vmpage is not mapped.

test

unittest_platform_vm

int unittest_platform_vm(void)

Unittest for virtual memory module.

vmpage_t

struct vmpage_t

Type has same structure as memblock_t.  The size of the mapped memory block is always a multiple of pagesize_vm.

Summary
addrPoints to start (lowest) address of memory.
sizeSize of memory in bytes addr points to.
lifetime
vmpage_FREEStatic initializer.
vmpage_INITStatic initializer.
init_vmpageMap memory into the virtual address space of the calling process.
init2_vmpageMap memory into the virtual address space of the calling process.
initaligned_vmpageMap new memory into the virtual address space of the calling process.
free_vmpageInvalidates virtual memory address range
query
isfree_vmpageReturns true if vmpage equals vmpage_FREE.
change
protect_vmpageSets protection of memory (e.g.
tryexpand_vmpageTries to grow the upper bound of an already mapped address range.
movexpand_vmpageGrows an already mapped virtual memory block.
shrink_vmpageShrinks the size of an already mapped virtual memory block.
genericcast_vmpageCasts a pointer to an compatible object into pointer to vmpage_t.

addr

uint8_t * addr

Points to start (lowest) address of memory.

size

size_t size

Size of memory in bytes addr points to.  A value of 0 indicates a free memory page.  The valid memory region is

addr[ 0 .. size - 1 ]

lifetime

vmpage_FREE

#define vmpage_FREE vmpage_INIT(0,
)

Static initializer.  Sets object of type vmpage_t to NULL.  Unmapping (free_vmpage) such a NULL vmpage_t is safe.

vmpage_INIT

#define vmpage_INIT(size,
addr) { addr, size }

Static initializer.  Precondition:

init_vmpage

int init_vmpage(/*out*/vmpage_t *vmpage,
size_t size_in_bytes)

Map memory into the virtual address space of the calling process.  The memory size is size_in_bytes rounded up to next multiple of pagesize_vm.  It is read and writeable.  All the changed content is private to the current processes.  A child process can access its content after a fork but see no changes the parent process also see no changes (COPY_ON_WRITE semantics).

init2_vmpage

int init2_vmpage(/*out*/vmpage_t *vmpage,
size_t size_in_bytes,
const accessmode_e access_mode)

Map memory into the virtual address space of the calling process.  The memory size is size_in_bytes rounded up to next multiple of pagesize_vm.  It is accessible as stated in paramter access_mode.  A child process can access its content after a fork and a change is shared with the parent process if accessmode_SHARED was specified.

initaligned_vmpage

int initaligned_vmpage(/*out*/vmpage_t *vmpage,
size_t powerof2_size_in_bytes)

Map new memory into the virtual address space of the calling process.  The new memory has size powerof2_size_in_bytes and its description is returned in vmpage.  It is read and writeable and not shared between processes.  The address of the new memory is aligned to its own size.  EINVAL is returned in case powerof2_size_in_bytes < pagesize_vm or if it is not a power of 2.

free_vmpage

int free_vmpage(vmpage_t *vmpage)

Invalidates virtual memory address range

vmpage->addr[0 .. vmpage->size - 1 ]

After successull return every access to this memory range will generate a memory exception and vmpage is set to vmpage_FREE.  Therefore unmapping an already unmapped memory region does nothing and returns success.

query

isfree_vmpage

bool isfree_vmpage(vmpage_t *vmpage)

Returns true if vmpage equals vmpage_FREE.

change

protect_vmpage

int protect_vmpage(vmpage_t *vmpage,
const accessmode_e access_mode)

Sets protection of memory (e.g. if write is possible).  See accessmode_e for a list of all supported bits.  accessmode_PRIVATE and accessmode_SHARED can not be changed after creation.

tryexpand_vmpage

int tryexpand_vmpage(vmpage_t *vmpage,
size_t size_in_bytes)

Tries to grow the upper bound of an already mapped address range.  The new memory size is size_in_bytes rounded up to next multiple of pagesize_vm.  If size_in_bytes is lower than vmpage->size EINVAL is returned and nothing is changed.  The start address of virtual memory block is not changed.  Returns 0 on success else ENOMEM or another system specific error code.  In case of success the new address range is

[ old:vmpage->addr .. old:vmpage->addr + (size_in_bytes rounded up to multiple of pagesize_vm()))

If the memory could not be expanded no error logging is done.

movexpand_vmpage

int movexpand_vmpage(vmpage_t *vmpage,
size_t size_in_bytes)

Grows an already mapped virtual memory block.  The new memory size is size_in_bytes rounded up to next multiple of pagesize_vm.  If size_in_bytes is lower than vmpage->size EINVAL is returned and nothing is changed.  If the block can not be expanded (see tryexpand_vmpage) it is relocated to a new virtual address with sufficient address space.  In case of success the new address range is

   [ old:vmpage->addr .. old:vmpage->addr + (size_in_bytes rounded up to multiple of pagesize_vm()))
or [ NEW_ADDR .. NEW_ADDR + (size_in_bytes rounded up to multiple of pagesize_vm())).

shrink_vmpage

int shrink_vmpage(vmpage_t *vmpage,
size_t size_in_bytes)

Shrinks the size of an already mapped virtual memory block.  The start address keeps same.  The new memory size is size_in_bytes rounded up to next multiple of pagesize_vm.  If size_in_bytes is greater than vmpage->size EINVAL is returned and nothing is changed.  In case of success the new address range is

[vmpage->addr .. vmpage->addr + (size_in_bytes rounded up to multiple of pagesize_vm())).

genericcast_vmpage

vmpage_t * genericcast_vmpage(void *obj,
IDNAME nameprefix)

Casts a pointer to an compatible object into pointer to vmpage_t.  The object must have two members nameprefix##addr and nameprefix##size of the same type as vmpage_t and in the same order.

vm_region_t

struct vm_region_t

Returns information about a mapped memory region and its access permissions.

Summary
addrStart address or lowest address of mapping.
endaddrEnd address of mapping.
protectionGives protection (access rights) of the memory block.
query
compare_vmregionReturns 0 if left and right regions compare equal.

addr

void * addr

Start address or lowest address of mapping.

endaddr

void * endaddr

End address of mapping.  It points to the address after the last mapped byte.  Therefore the length in pages can be calculated as:

(endaddr - addr) / pagesize_vm()

protection

accessmode_e protection

Gives protection (access rights) of the memory block.  See accessmode_e for a list of supported bits.

query

compare_vmregion

int compare_vmregion(const vm_region_t *left,
const vm_region_t *right)

Returns 0 if left and right regions compare equal.

vm_mappedregions_t

struct vm_mappedregions_t

Buffer which stores a snapshot of all mapped memory regions.  Use init_vmmappedregions to store a snapshot of the current mapping.  Do not forget to call free_vmmappedregions after using.  To access individual mapping descriptions of type vm_region_t use next_vmmappedregions.  With gofirst_vmmappedregions you can reset the internal iterator and scan from the beginning again.

Summary
private variables
total_countNumber of stored elements of type vm_region_t.
element_countNumber of elements element_iterator can access in sequence.
element_iteratorPoints to an array of vm_region_t of size element_count.
array_iteratorPoints to next array of vm_region_t which comes after array element_iterator points to.
first_arrayPoints to first array of vm_region_t.
lifetime
vm_mappedregions_FREEStatic initializer: Makes calling free_vmmappedregions safe.
init_vmmappedregionsReturns in mappedregions the descriptions of all current virtual memory mappings.
free_vmmappedregionsFree internal memory cache used to store all vm_region_t objects.
query
size_vmmappedregionsReturns the total number of contained vm_region_t.
compare_vmmappedregionsReturns 0 if all regions stored in left and right container compare equal.
ismapped_vmmappedregionsReturns true if mappedregions contains a memory region with correct protection.
isunmapped_vmmappedregionsReturns true if mappedregions contains no memory region which overlaps with mblock.
iterate
gofirst_vmmappedregionsResets iterator to the first element.
next_vmmappedregionsReturns the next vm_region_t in the set of all stored elements.

private variables

total_count

size_t total_count

Number of stored elements of type vm_region_t.

element_count

size_t element_count

Number of elements element_iterator can access in sequence.  Used to implement internal iterator.

element_iterator

vm_region_t * element_iterator

Points to an array of vm_region_t of size element_count.  Used to implement internal iterator.

array_iterator

vm_regionsarray_t * array_iterator

Points to next array of vm_region_t which comes after array element_iterator points to.  Used to implement internal iterator.

first_array

vm_regionsarray_t * first_array

Points to first array of vm_region_t.  The memory is organized as a list of arrays of elements of type vm_region_t.  Used to implement internal iterator and to free memory.

lifetime

vm_mappedregions_FREE

#define vm_mappedregions_FREE { 0, 0, 0, 0, 0 }

Static initializer: Makes calling free_vmmappedregions safe.

init_vmmappedregions

int init_vmmappedregions(/*out*/vm_mappedregions_t *mappedregions)

Returns in mappedregions the descriptions of all current virtual memory mappings.  If changes are made to the mapping of virtual memory pages after the call to init mappedregions still holds the old mapping description.  See vm_region_t for a description of the returned information.

free_vmmappedregions

int free_vmmappedregions(vm_mappedregions_t *mappedregions)

Free internal memory cache used to store all vm_region_t objects.

query

size_vmmappedregions

size_t size_vmmappedregions(const vm_mappedregions_t *mappedregions)

Returns the total number of contained vm_region_t.

compare_vmmappedregions

int compare_vmmappedregions(const vm_mappedregions_t *left,
const vm_mappedregions_t *right)

Returns 0 if all regions stored in left and right container compare equal.

ismapped_vmmappedregions

bool ismapped_vmmappedregions(vm_mappedregions_t *mappedregions,
const vmpage_t *mblock,
accessmode_e protection)

Returns true if mappedregions contains a memory region with correct protection. if mblock is not fully contained or the protection is different false is returned.

isunmapped_vmmappedregions

bool isunmapped_vmmappedregions(vm_mappedregions_t *mappedregions,
const vmpage_t *mblock)

Returns true if mappedregions contains no memory region which overlaps with mblock.

iterate

gofirst_vmmappedregions

void gofirst_vmmappedregions(vm_mappedregions_t *iterator)

Resets iterator to the first element.  The next call to next_vmmappedregions will return the first contained element.  See generic <ArrayList Iterator> for a more in deep description.

next_vmmappedregions

const vm_region_t * next_vmmappedregions(vm_mappedregions_t *iterator)

Returns the next vm_region_t in the set of all stored elements.  NULL is returned if there is no next element.  See generic <ArrayList Iterator> for a more in deep description.

inline implementation

Macros

genericcast_vmpage

#define genericcast_vmpage(
   obj,
   nameprefix
) ( __extension__ ({ typeof(obj) _obj = (obj) ; static_assert( sizeof(_obj->nameprefix##addr) == sizeof(((vmpage_t*)0)->addr) && 0 == offsetof(vmpage_t, addr), "addr member is compatible") ; static_assert( sizeof(_obj->nameprefix##size) == sizeof(((vmpage_t*)0)->size) && offsetof(vmpage_t, size) == ((uintptr_t)&_obj->nameprefix##size) -((uintptr_t)&_obj->nameprefix##addr), "size member is compatible") ; if (0) { volatile uint8_t _err ; volatile size_t _size ; _size = _obj->nameprefix##size ; _err = _obj->nameprefix##addr[_size] ; (void) _err ; } (vmpage_t *)(&_obj->nameprefix##addr) ; }))

Implements vmpage_t.genericcast_vmpage.

init_vmpage

#define init_vmpage(
   vmpage,
   size_in_bytes
) (init2_vmpage((vmpage), (size_in_bytes), accessmode_RDWR|accessmode_PRIVATE))

Implements vmpage_t.init_vmpage.

isfree_vmpage

#define isfree_vmpage(vmpage) (0 == (vmpage)->addr && 0 == (vmpage)->size)

Implements <vmpage_t.isfree_vmpage>>.

log2pagesize_vm

#define log2pagesize_vm() (valuecache_maincontext()->log2pagesize_vm)

Uses cached value from valuecache_maincontext.

pagesize_vm

#define pagesize_vm() (valuecache_maincontext()->pagesize_vm)

Uses cached value from valuecache_maincontext.

size_vmmappedregions

#define size_vmmappedregions(mappedregions) ((mappedregions)->total_count)

Returns vm_mappedregions_t->total_count.  Inline implementation of vm_mappedregions_t.size_vmmappedregions.

Manages mapping of virtual memory pages.
Implements VirtualMemory, mapping of virtual memory pages.
typedef struct vmpage_t vmpage_t
Exports vmpage_t into global namespace.
struct vmpage_t
Type has same structure as memblock_t.
typedef struct vm_region_t vm_region_t
Exports vm_region_t, describes a single virtual memory region.
struct vm_region_t
Returns information about a mapped memory region and its access permissions.
typedef struct vm_mappedregions_t vm_mappedregions_t
Exports vm_mappedregions_t, description of all mapped memory.
struct vm_mappedregions_t
Buffer which stores a snapshot of all mapped memory regions.
typedef struct vm_regionsarray_t vm_regionsarray_t
Internal type used by vm_mappedregions_t.
uint8_t log2pagesize_vm(void)
Returns log2_int of pagesize_vm.
Implements int_t.log2_int as a generic function.
uint32_t pagesize_vm(void)
Returns the virtual memory page size supported by the underlying system.
ramsize_t sizephysram_vm(void)
Returns size of all physical memory in bytes.
ramsize_t sizeavailableram_vm(void)
Returns size of available physical memory in bytes
uint32_t sys_pagesize_vm(void)
Returns the virtual memory page size supported by the underlying system.
bool ismapped_vm(const vmpage_t *vmpage,
accessmode_e protection)
Returns true is vmpage is mapped whose accessmode equals protection.
bool isunmapped_vm(const vmpage_t *vmpage)
Returns true if memory at vmpage is not mapped.
int unittest_platform_vm(void)
Unittest for virtual memory module.
struct memblock_t
Describes memory block.
uint8_t * addr
Points to start (lowest) address of memory.
size_t size
Size of memory in bytes addr points to.
#define vmpage_FREE vmpage_INIT(0,
)
Static initializer.
#define vmpage_INIT(size,
addr) { addr, size }
Static initializer.
int init_vmpage(/*out*/vmpage_t *vmpage,
size_t size_in_bytes)
Map memory into the virtual address space of the calling process.
int init2_vmpage(/*out*/vmpage_t *vmpage,
size_t size_in_bytes,
const accessmode_e access_mode)
Map memory into the virtual address space of the calling process.
int initaligned_vmpage(/*out*/vmpage_t *vmpage,
size_t powerof2_size_in_bytes)
Map new memory into the virtual address space of the calling process.
int free_vmpage(vmpage_t *vmpage)
Invalidates virtual memory address range
bool isfree_vmpage(vmpage_t *vmpage)
Returns true if vmpage equals vmpage_FREE.
int protect_vmpage(vmpage_t *vmpage,
const accessmode_e access_mode)
Sets protection of memory (e.g.
int tryexpand_vmpage(vmpage_t *vmpage,
size_t size_in_bytes)
Tries to grow the upper bound of an already mapped address range.
int movexpand_vmpage(vmpage_t *vmpage,
size_t size_in_bytes)
Grows an already mapped virtual memory block.
int shrink_vmpage(vmpage_t *vmpage,
size_t size_in_bytes)
Shrinks the size of an already mapped virtual memory block.
vmpage_t * genericcast_vmpage(void *obj,
IDNAME nameprefix)
Casts a pointer to an compatible object into pointer to vmpage_t.
void * addr
Start address or lowest address of mapping.
void * endaddr
End address of mapping.
accessmode_e protection
Gives protection (access rights) of the memory block.
int compare_vmregion(const vm_region_t *left,
const vm_region_t *right)
Returns 0 if left and right regions compare equal.
size_t total_count
Number of stored elements of type vm_region_t.
size_t element_count
Number of elements element_iterator can access in sequence.
vm_region_t * element_iterator
Points to an array of vm_region_t of size element_count.
vm_regionsarray_t * array_iterator
Points to next array of vm_region_t which comes after array element_iterator points to.
vm_regionsarray_t * first_array
Points to first array of vm_region_t.
#define vm_mappedregions_FREE { 0, 0, 0, 0, 0 }
Static initializer: Makes calling free_vmmappedregions safe.
int free_vmmappedregions(vm_mappedregions_t *mappedregions)
Free internal memory cache used to store all vm_region_t objects.
int init_vmmappedregions(/*out*/vm_mappedregions_t *mappedregions)
Returns in mappedregions the descriptions of all current virtual memory mappings.
size_t size_vmmappedregions(const vm_mappedregions_t *mappedregions)
Returns the total number of contained vm_region_t.
int compare_vmmappedregions(const vm_mappedregions_t *left,
const vm_mappedregions_t *right)
Returns 0 if all regions stored in left and right container compare equal.
bool ismapped_vmmappedregions(vm_mappedregions_t *mappedregions,
const vmpage_t *mblock,
accessmode_e protection)
Returns true if mappedregions contains a memory region with correct protection.
bool isunmapped_vmmappedregions(vm_mappedregions_t *mappedregions,
const vmpage_t *mblock)
Returns true if mappedregions contains no memory region which overlaps with mblock.
void gofirst_vmmappedregions(vm_mappedregions_t *iterator)
Resets iterator to the first element.
const vm_region_t * next_vmmappedregions(vm_mappedregions_t *iterator)
Returns the next vm_region_t in the set of all stored elements.
#define genericcast_vmpage(
   obj,
   nameprefix
) ( __extension__ ({ typeof(obj) _obj = (obj) ; static_assert( sizeof(_obj->nameprefix##addr) == sizeof(((vmpage_t*)0)->addr) && 0 == offsetof(vmpage_t, addr), "addr member is compatible") ; static_assert( sizeof(_obj->nameprefix##size) == sizeof(((vmpage_t*)0)->size) && offsetof(vmpage_t, size) == ((uintptr_t)&_obj->nameprefix##size) -((uintptr_t)&_obj->nameprefix##addr), "size member is compatible") ; if (0) { volatile uint8_t _err ; volatile size_t _size ; _size = _obj->nameprefix##size ; _err = _obj->nameprefix##addr[_size] ; (void) _err ; } (vmpage_t *)(&_obj->nameprefix##addr) ; }))
Implements vmpage_t.genericcast_vmpage.
#define init_vmpage(
   vmpage,
   size_in_bytes
) (init2_vmpage((vmpage), (size_in_bytes), accessmode_RDWR|accessmode_PRIVATE))
Implements vmpage_t.init_vmpage.
#define isfree_vmpage(vmpage) (0 == (vmpage)->addr && 0 == (vmpage)->size)
Implements <vmpage_t.isfree_vmpage>>.
#define valuecache_maincontext() (pcontext_maincontext()->valuecache)
Inline implementation of maincontext_t.valuecache_maincontext.
#define size_vmmappedregions(mappedregions) ((mappedregions)->total_count)
Returns vm_mappedregions_t->total_count.
A write to a data or memory block is shared between all processes.
Determines how you can access a data block (on disk or in memory).
Write access to data or memory block is private to its process (COPY_ON_WRITE).
Close