CMemPagePool Class Reference

#include <s32page.h>

class CMemPagePool : public CBase, public MPagePool

Inherits from

Detailed Description

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.

Constructor & Destructor Documentation

CMemPagePool ( )

IMPORT_CCMemPagePool()

Default constructor.

~CMemPagePool ( )

IMPORT_C~CMemPagePool()

Destructor.

On destruction, memory for all pages is freed.

Member Function Documentation

AcquireL ( )

IMPORT_C TPageAbandonFunctionAcquireL()[virtual]

Reimplemented from MPagePool::AcquireL()

For memory-based pools, there is no need to abandon pages, so the function returned does nothing.

Return Value
Function that does nothing.

AllocL ( )

IMPORT_C TAny *AllocL()[virtual]

Reimplemented from MPagePool::AllocL()

Allocates a new unassigned page.

Return Value
Newly allocated page.

AssignL ( const TAny *, TPageReclamation )

IMPORT_C TPageRefAssignL(const TAny *aPage,
TPageReclamationaReclamation = EPageDeleteOnly
)[virtual]

Reimplemented from MPagePool::AssignL(const TAny *,TPageReclamation)

DoDeleteL ( TPageRef )

IMPORT_C voidDoDeleteL(TPageRefaRef)[protected, virtual]

LockL ( TPageRef )

IMPORT_C TAny *LockL(TPageRefaRef)[virtual]

Reimplemented from MPagePool::LockL(TPageRef)

Returns a pointer to a specified page.

Parameters
aRefReference to the page to get
Return Value
Page specified by aRef

NewL ( )

IMPORT_C CMemPagePool *NewL()[static]

Allocates and constructs a new CMemPagePool object.

Return Value
New CMemPagePool object

NewLC ( )

IMPORT_C CMemPagePool *NewLC()[static]

Allocates and constructs a new CMemPagePool object, and leaves it on the cleanup stack.

Return Value
New CMemPagePool object

Unlock ( const TAny *, TPageChange )

IMPORT_C voidUnlock(const TAny *aPage,
TPageChangeaChange = EPageNoChange
)[virtual]

Unlocks a page.

Parameters
aPagePage to unlock
aChangeHow the page should be treated once it is unlocked

UpdateL ( const TAny * )

IMPORT_C voidUpdateL(const TAny *aPage)[virtual]

Updates a page.

This can be used for cached pages that may have become outdated.

Parameters
aPagePage to update