TShPoolCreateInfo Class Reference

class TShPoolCreateInfo

Specifies characteristics of the pool to be created.

RShPool::Create()

Constructor & Destructor Documentation

TShPoolCreateInfo(TShPoolPageAlignedBuffers, TUint, TUint)

IMPORT_C TShPoolCreateInfo ( TShPoolPageAlignedBuffers aFlag,
TUint aBufSize,
TUint aInitialBufs
)

Specifies the buffer size and initial number of committed buffers for a pool with page-aligned buffers.

Parameters

TShPoolPageAlignedBuffers aFlag Page-aligned buffers
TUint aBufSize Size in bytes of each buffer within the pool
TUint aInitialBufs Initial number of buffers allocated to the pool

TShPoolCreateInfo(TShPoolNonPageAlignedBuffers, TUint, TUint, TUint)

IMPORT_C TShPoolCreateInfo ( TShPoolNonPageAlignedBuffers aFlag,
TUint aBufSize,
TUint aInitialBufs,
TUint aAlignment
)

Specifies the buffer size, initial number of committed buffers, and buffer alignment for a pool with non-page-aligned buffers.

Parameters

TShPoolNonPageAlignedBuffers aFlag Non-page aligned buffers
TUint aBufSize Size in bytes of each buffer within the pool
TUint aInitialBufs Initial number of buffers allocated to the pool
TUint aAlignment Alignment of the start of each buffer in the pool (shift/log2 value)

TShPoolCreateInfo()

TShPoolCreateInfo ( ) [private]

Member Functions Documentation

SetExclusive()

IMPORT_C TInt SetExclusive ( )

Ensures that each buffer is mapped into at most one process address space at a time.

If this is set for a non-page-aligned pool, the pool creation will fail.

SetGuardPages()

IMPORT_C TInt SetGuardPages ( )

Specifies that unmapped guard pages are inserted between each buffer in a process's address space.

If this is set for a non-page-aligned pool, the pool creation will fail.

SetSizingAttributes(TUint, TUint, TUint, TUint)

IMPORT_C TInt SetSizingAttributes ( TUint aMaxBufs,
TUint aGrowTriggerRatio,
TUint aGrowByRatio,
TUint aShrinkHysteresisRatio
)

Sets the sizing attributes for the pool, allowing it to grow and shrink automatically.

If either aGrowTriggerRatio or aGrowByRatio is 0, no automatic growing or shrinking will be performed.

Parameters

TUint aMaxBufs The maximum number of buffers that the pool can grow to. This value must not be less than aInitialBufs.
TUint aGrowTriggerRatio This specifies when to grow the pool. When the proportion of free buffers in the pool drops below this value, the pool will be grown. This value is expressed as a 32-bit fixed-point number, where the binary point is defined to be between bits 7 and 8 (where the least-significant bit is defined as bit 0). (This format is also known as a Q8, or fx24.8 number, or alternatively as the value * 256.) It must represent a value < 1 (i.e. must be < 256).
TUint aGrowByRatio The proportion to grow the pool by each time, expressed as a 32-bit fx24.8 fixed-point number, in the same way as aGrowTriggerRatio.
TUint aShrinkHysteresisRatio The hysteresis value to ensure that a pool is not automatically shrunk immediately after it is grown. Automatic shrinking will only happen when there are (aGrowTriggerRatio + aGrowByRatio) * aShrinkHysteresisRatio * (total buffers in the pool) free buffers left in the pool. This is a 32-bit fx24.8 fixed-point number in the same way as aGrowTriggerRatio and aGrowByRatio. It must represent a value > 1 (i.e. must be > 256).

Member Enumerations Documentation

Enum TShPoolNonPageAlignedBuffers

Enumeration type to create a pool with non-page-aligned buffers.

The buffers in the pool do not have any size or alignment restrictions beyond the iAlignment specified in TShPoolInfo .

The whole pool will always mapped into a process's address space.

Enumerators

ENonPageAlignedBuffer = EShPoolNonPageAlignedBuffer

Enum TShPoolPageAlignedBuffers

Enumeration type to create a pool with page-aligned buffers.

The buffers in the pool will be at least the size of an MMU page, aligned to an MMU page, and may be mapped in and out of a process's address space independently.

Enumerators

EPageAlignedBuffer = EShPoolPageAlignedBuffer

Member Data Documentation

TShPoolInfo iInfo

TShPoolInfo iInfo [private]