#include <s32page.h>
class CMemPagePool : public CBase, public MPagePool |
Public Member Functions | |
---|---|
CMemPagePool() | |
~CMemPagePool() | |
virtual IMPORT_C TPageAbandonFunction | AcquireL() |
virtual IMPORT_C TAny * | AllocL() |
virtual IMPORT_C TPageRef | AssignL(const TAny *, TPageReclamation) |
virtual IMPORT_C TAny * | LockL(TPageRef) |
IMPORT_C CMemPagePool * | NewL() |
IMPORT_C CMemPagePool * | NewLC() |
virtual IMPORT_C void | Unlock(const TAny *, TPageChange) |
virtual IMPORT_C void | UpdateL(const TAny *) |
Protected Member Functions | |
---|---|
virtual IMPORT_C void | DoDeleteL(TPageRef) |
Uses memory to implement the MPagePool page pool interface.
The class allocates pages from the default heap, storing them in an array. This pool is not persistent.
IMPORT_C | ~CMemPagePool | ( | ) |
Destructor.
On destruction, memory for all pages is freed.
IMPORT_C TPageAbandonFunction | AcquireL | ( | ) | [virtual] |
Reimplemented from MPagePool::AcquireL()
For memory-based pools, there is no need to abandon pages, so the function returned does nothing.
IMPORT_C TAny * | AllocL | ( | ) | [virtual] |
Reimplemented from MPagePool::AllocL()
Allocates a new unassigned page.
IMPORT_C TPageRef | AssignL | ( | const TAny * | aPage, |
TPageReclamation | aReclamation = EPageDeleteOnly | |||
) | [virtual] |
Reimplemented from MPagePool::AssignL(const TAny *,TPageReclamation)
IMPORT_C void | DoDeleteL | ( | TPageRef | aRef | ) | [protected, virtual] |
Reimplemented from MPagePool::DoDeleteL(TPageRef)
Reimplemented from MPagePool::LockL(TPageRef)
Returns a pointer to a specified page.
Parameters | |
---|---|
aRef | Reference to the page to get |
IMPORT_C CMemPagePool * | NewL | ( | ) | [static] |
Allocates and constructs a new CMemPagePool object.
IMPORT_C CMemPagePool * | NewLC | ( | ) | [static] |
Allocates and constructs a new CMemPagePool object, and leaves it on the cleanup stack.
IMPORT_C void | Unlock | ( | const TAny * | aPage, |
TPageChange | aChange = EPageNoChange | |||
) | [virtual] |
Reimplemented from MPagePool::Unlock(const TAny *,TPageChange)
Unlocks a page.
Parameters | |
---|---|
aPage | Page to unlock |
aChange | How the page should be treated once it is unlocked |
IMPORT_C void | UpdateL | ( | const TAny * | aPage | ) | [virtual] |
Reimplemented from MPagePool::UpdateL(const TAny *)
Updates a page.
This can be used for cached pages that may have become outdated.
Parameters | |
---|---|
aPage | Page to update |