This interface is used by the toolkit for allocation and deallocation of pages in a page cache. More...
Public Member Functions | |
HRESULT | Initialize ([in] aafUInt32 pageCount,[in] aafUInt32 pageSize) |
Initialize. | |
HRESULT | Allocate ([out] aafMemPtr_t *pPage) |
Allocate a cache page. | |
HRESULT | Deallocate ([in] aafMemPtr_t page) |
Dellocate a cache page. |
This interface is used by the toolkit for allocation and deallocation of pages in a page cache.
It is typically implemented by clients requiring control over how memory is allocated. By implementing this interface clients are able to control aspects of memory allocation such as the source from which the memory is obtained, how the memory is aligned etc.
Notes for implementers -
In addition to the specific error results listed for each method, all methods in this interface may also return one of the following values:
AAFRESULT_NOMEMORY
HRESULT IAAFCachePageAllocator::Allocate | ( | [out] aafMemPtr_t * | pPage | ) |
Allocate a cache page.
pPage | [out] Pointer to the newly allocated page |
HRESULT IAAFCachePageAllocator::Deallocate | ( | [in] aafMemPtr_t | page | ) |
Dellocate a cache page.
page | [in] Pointer to the page to deallocate |
HRESULT IAAFCachePageAllocator::Initialize | ( | [in] aafUInt32 | pageCount, |
[in] aafUInt32 | pageSize | ||
) |
Initialize.
pageCount | [in] Maximum number of pages to allocate |
pageSize | [in] Size in bytes of each page |