|
BDE 4.39.x Production Release
|
#include <bdls_memoryutil.h>
Public Types | |
| enum | Access { k_ACCESS_NONE = 0 , k_ACCESS_READ = 0x1 , k_ACCESS_WRITE = 0x2 , k_ACCESS_EXECUTE = 0x4 , k_ACCESS_READ_WRITE = k_ACCESS_READ | k_ACCESS_WRITE , k_ACCESS_READ_EXECUTE = k_ACCESS_READ | k_ACCESS_EXECUTE , k_ACCESS_WRITE_EXECUTE = k_ACCESS_WRITE | k_ACCESS_EXECUTE , k_ACCESS_READ_WRITE_EXECUTE , BDESU_ACCESS_NONE = k_ACCESS_NONE , BDESU_ACCESS_READ = k_ACCESS_READ , BDESU_ACCESS_WRITE = k_ACCESS_WRITE , BDESU_ACCESS_EXECUTE = k_ACCESS_EXECUTE , BDESU_ACCESS_READ_WRITE = k_ACCESS_READ_WRITE , BDESU_ACCESS_READ_EXECUTE = k_ACCESS_READ_EXECUTE , BDESU_ACCESS_WRITE_EXECUTE = k_ACCESS_WRITE_EXECUTE , BDESU_ACCESS_READ_WRITE_EXECUTE = k_ACCESS_READ_WRITE_EXECUTE , ACCESS_READ = k_ACCESS_READ , ACCESS_WRITE = k_ACCESS_WRITE , ACCESS_EXECUTE = k_ACCESS_EXECUTE , ACCESS_NONE = k_ACCESS_NONE , ACCESS_READ_WRITE = k_ACCESS_READ_WRITE , ACCESS_READ_EXECUTE = k_ACCESS_READ_EXECUTE , ACCESS_WRITE_EXECUTE = k_ACCESS_WRITE_EXECUTE , ACCESS_READ_WRITE_EXECUTE = k_ACCESS_READ_WRITE_EXECUTE } |
Static Public Member Functions | |
| static int | pageSize () |
| static int | protect (void *address, int numBytes, int mode) |
| static void * | allocate (int numBytes) |
| static int | deallocate (void *address) |
|
static |
Allocate an area of memory of the specified size numBytes, aligned on a page boundary. Return a pointer to allocated memory on success, and a null pointer otherwise.
|
static |
Deallocate a memory area at the specified address previously allocated with the allocate method. Return 0 on success, and a nonzero value otherwise.
|
static |
Return the memory page size of the platform.
|
static |
Change the access protection on a region of memory starting at the specified address and numBytes long, according to specified mode, making memory readable if (mode & ACCESS_READ) is nonzero and writable if (mode & ACCESS_WRITE) is nonzero. Return 0 on success, and a nonzero value otherwise.
addr is not aligned on a page boundary, if numBytes is not a multiple of pageSize(), or if numBytes is 0.