paging.h

Summary
Report that VirtualProtect or mprotect failed and abort program execution.
Create memory.
Allow memory access to allocated memory.
Deny access to allocated memory region.
Free’s DUMA allocated memory.
Retrieve page size.

Functions

mprotectFailed

static void mprotectFailed( void )

Report that VirtualProtect or mprotect failed and abort program execution.

Page_Create

static void * Page_Create( size_t  size,
int  exitonfail,
int  printerror,
int  flags )

Create memory.  Allocates actual memory.  Uses VirtualAlloc on windows and mmap on unix.

flags Passed along from kmalloc (GFP_ATOMIC and the like)

See Also

Page_Delete

Page_AllowAccess

void Page_AllowAccess( void  * address,
size_t  size )

Allow memory access to allocated memory.

See Also

Page_DenyAccess

Page_DenyAccess

static void Page_DenyAccess( void  * address,
size_t  size )

Deny access to allocated memory region.

See Also

Page_AllowAccess

Page_Delete

static void Page_Delete( void  * address,
size_t  size )

Free’s DUMA allocated memory.  This is the real deal, make sure the page is no longer in our slot list first!

See Also

Page_Create

Page_Size

static size_t Page_Size( void )

Retrieve page size.

static void mprotectFailed( void )
Report that VirtualProtect or mprotect failed and abort program execution.
static void * Page_Create( size_t  size,
int  exitonfail,
int  printerror,
int  flags )
Create memory.
void Page_AllowAccess( void  * address,
size_t  size )
Allow memory access to allocated memory.
static void Page_DenyAccess( void  * address,
size_t  size )
Deny access to allocated memory region.
static void Page_Delete( void  * address,
size_t  size )
Free’s DUMA allocated memory.
static size_t Page_Size( void )
Retrieve page size.