All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
virtualMemory.h File Reference

Architecture dependent routines for virtual memory. More...

+ Include dependency graph for virtualMemory.h:

Go to the source code of this file.

Functions

ARCH_API void * ArchReserveVirtualMemory (size_t numBytes)
 Reserve numBytes bytes of virtual memory. More...
 
ARCH_API bool ArchCommitVirtualMemoryRange (void *start, size_t numBytes)
 Make the range of numBytes bytes starting at start available for reading and writing. More...
 
ARCH_API bool ArchFreeVirtualMemory (void *start, size_t numBytes)
 Return memory obtained with ArchReserveVirtualMemory() to the system. More...
 

Detailed Description

Architecture dependent routines for virtual memory.

Definition in file virtualMemory.h.

Function Documentation

ARCH_API bool ArchCommitVirtualMemoryRange ( void *  start,
size_t  numBytes 
)

Make the range of numBytes bytes starting at start available for reading and writing.

The range must be within one previously reserved by ArchReserveVirtualMemory(). It is not an error to commit a range that was previously partly or fully committed. Return false in case of an error; check errno.

ARCH_API bool ArchFreeVirtualMemory ( void *  start,
size_t  numBytes 
)

Return memory obtained with ArchReserveVirtualMemory() to the system.

The start argument must be the value returned from a previous call to ArchReserveVirtualMemory, and numBytes must match the argument from that call. Memory within the range may not be accessed after this call. Return false in case of an error; check errno.

ARCH_API void* ArchReserveVirtualMemory ( size_t  numBytes)

Reserve numBytes bytes of virtual memory.

Call ArchCommitVirtualMemory() on subranges to write to and read from the memory. Return nullptr in case of an error; check errno.