Public Member Functions | |
void * | alloc (size_t size) |
Convenience function. | |
void * | dup (void *memory, size_t size) |
Duplicate existing memory block into allocated memory. | |
char * | dup (char *string) |
Duplicate NULL terminated string into allocated memory. | |
void * | zalloc (size_t size) |
Allocate memory from the pager heap. | |
Protected Member Functions | |
virtual void * | _alloc (size_t size)=0 |
Protocol to allocate memory from the pager heap. | |
virtual void | fault (void) |
Allocation failure handler. | |
Friends | |
class | MemoryRedirect |
Definition at line 42 of file protocols.h.
virtual void* ucommon::MemoryProtocol::_alloc | ( | size_t | size | ) | [protected, pure virtual] |
Protocol to allocate memory from the pager heap.
The size of the request must be less than the size of the memory page used. The actual method is in a derived or stacked object.
size | of memory request. |
Implemented in ucommon::memalloc, ucommon::mempager, ucommon::bufpager, and ucommon::MemoryRedirect.
void* ucommon::MemoryProtocol::alloc | ( | size_t | size | ) | [inline] |
Convenience function.
size | of memory request. |
Definition at line 69 of file protocols.h.
void* ucommon::MemoryProtocol::dup | ( | void * | memory, | |
size_t | size | |||
) |
Duplicate existing memory block into allocated memory.
This uses alloc.
memory | to data copy from. | |
size | of memory to allocate. |
char* ucommon::MemoryProtocol::dup | ( | char * | string | ) |
Duplicate NULL terminated string into allocated memory.
This uses alloc.
string | to copy into memory. |
void* ucommon::MemoryProtocol::zalloc | ( | size_t | size | ) |
Allocate memory from the pager heap.
The size of the request must be less than the size of the memory page used. The memory is initialized to zero. This uses alloc.
size | of memory request. |