Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: sb32tree.h
Link against: estor.lib

Class CMemPagePool

CMemPagePool

Support

Supported from 5.0

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.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CMemPagePoolUses memory to implement the MPagePool page pool interface
MPagePoolInterface to a page pool, the storage abstraction used by the B-trees API

Defined in CMemPagePool:
AcquireL(), AllocL(), AssignL(), CMemPagePool(), LockL(), NewL(), NewLC(), Unlock(), UpdateL(), ~CMemPagePool()

Inherited from CBase:
operator new()

Inherited from MPagePool:
Delete(), DeleteL(), Pop(), PushL()


Construction


NewL()

static CMemPagePool* NewL();

Description

Allocates and constructs a new CMemPagePool object.

Return value

CMemPagePool*

New CMemPagePool object


NewLC()

static CMemPagePool* NewLC();

Description

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

Return value

CMemPagePool*

New CMemPagePool object


CMemPagePool()

CMemPagePool();

Description

Default constructor.


~CMemPagePool()

~CMemPagePool();

Description

Destructor.

On destruction, memory for all pages is freed.

[Top]


Member functions


AcquireL()

TPageAbandonFunction AcquireL();

Description

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

Return value

TPageAbandonFunction

Function that does nothing.


AllocL()

TAny* AllocL();

Description

Allocates a new unassigned page.

Return value

TAny*

Newly allocated page.


AssignL()

TPageRef AssignL(const TAny* aPage,TPageReclamation aReclamation=EPageDeleteOnly);

Description

Assigns a reference to a new page.

Parameters

const TAny* aPage

Page to assign

TPageReclamation aReclamation=EPageDeleteOnly

Flag for page reclaimation settings

Return value

TPageRef

Reference to the page


LockL()

TAny* LockL(TPageRef aRef);

Description

Returns a pointer to a specified page.

Parameters

TPageRef aRef

Reference to the page to get

Return value

TAny*

Page specified by aRef


Unlock()

void Unlock(const TAny* aPage,TPageChange aChange=EPageNoChange);

Description

Memory-based pages do not need to be unlocked, so this function is implemented to do nothing.

Parameters

const TAny* aPage

Page to unlock

TPageChange aChange=EPageNoChange

How the page should be treated once it is unlocked


UpdateL()

void UpdateL(const TAny* aPage);

Description

Memory-based pages do not need to be unpdated, so this function is implemented to do nothing.

Parameters

const TAny* aPage

Page to update