#include <CacheAllocator.h>
Inheritance diagram for CacheAllocator:
Public Member Functions | |
virtual | ~CacheAllocator () |
virtual void * | allocate (int *pErrorCode=NULL)=0 |
Allocates a chunk of memory of size determined by the constructor. | |
virtual int | deallocate (void *pMem, int *pErrorCode=NULL)=0 |
Deallocates a chunk of memory. | |
virtual size_t | getBytesAllocated () const=0 |
| |
virtual int | setProtection (void *pMem, uint cb, bool readOnly, int *pErrorCode=NULL)=0 |
Changes protection state for a contiguous range of virtual memory. |
Definition at line 33 of file CacheAllocator.h.
CacheAllocator::~CacheAllocator | ( | ) | [virtual] |
virtual void* CacheAllocator::allocate | ( | int * | pErrorCode = NULL |
) | [pure virtual] |
Allocates a chunk of memory of size determined by the constructor.
pErrorCode | on error and if non-NULL, the int referenced is modified to contain the OS error code |
Implemented in VMAllocator.
Referenced by CacheImpl< PageT, VictimPolicyT >::allocatePages(), and CacheImpl< PageT, VictimPolicyT >::setAllocatedPageCount().
virtual int CacheAllocator::deallocate | ( | void * | pMem, | |
int * | pErrorCode = NULL | |||
) | [pure virtual] |
Deallocates a chunk of memory.
pMem | the allocated memory | |
pErrorCode | on error and if non-NULL, the int referenced is modified to contain the OS error code |
Implemented in VMAllocator.
Referenced by CacheImpl< PageT, VictimPolicyT >::allocatePages(), CacheImpl< PageT, VictimPolicyT >::closeImpl(), and CacheImpl< PageT, VictimPolicyT >::setAllocatedPageCount().
virtual size_t CacheAllocator::getBytesAllocated | ( | ) | const [pure virtual] |
virtual int CacheAllocator::setProtection | ( | void * | pMem, | |
uint | cb, | |||
bool | readOnly, | |||
int * | pErrorCode = NULL | |||
) | [pure virtual] |
Changes protection state for a contiguous range of virtual memory.
pMem | start of range | |
cb | number of bytes in range | |
readOnly | true for read-only; false for read-write (TODO jvs 7-Feb-2006: support no-access as well) | |
pErrorCode | on error and if non-NULL, the int referenced is modified to contain the OS error code |
Implemented in VMAllocator.