TShPoolCreateInfo Class Reference

class TShPoolCreateInfo

Specifies characteristics of the pool to be created.

RShPool::Create()

Public Member Functions
TShPoolCreateInfo(TShPoolPageAlignedBuffers, TUint, TUint)
TShPoolCreateInfo(TShPoolNonPageAlignedBuffers, TUint, TUint, TUint)
IMPORT_C TIntSetExclusive()
IMPORT_C TIntSetGuardPages()
IMPORT_C TIntSetSizingAttributes(TUint, TUint, TUint, TUint)
Private Member Functions
TShPoolCreateInfo()
Public Member Enumerations
enumTShPoolNonPageAlignedBuffers { ENonPageAlignedBuffer = EShPoolNonPageAlignedBuffer }
enumTShPoolPageAlignedBuffers { EPageAlignedBuffer = EShPoolPageAlignedBuffer }
Private Attributes
TShPoolInfo iInfo

Constructor & Destructor Documentation

TShPoolCreateInfo(TShPoolPageAlignedBuffers, TUint, TUint)

IMPORT_CTShPoolCreateInfo(TShPoolPageAlignedBuffersaFlag,
TUintaBufSize,
TUintaInitialBufs
)

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

Parameters

TShPoolPageAlignedBuffers aFlagPage-aligned buffers
TUint aBufSizeSize in bytes of each buffer within the pool
TUint aInitialBufsInitial number of buffers allocated to the pool

TShPoolCreateInfo(TShPoolNonPageAlignedBuffers, TUint, TUint, TUint)

IMPORT_CTShPoolCreateInfo(TShPoolNonPageAlignedBuffersaFlag,
TUintaBufSize,
TUintaInitialBufs,
TUintaAlignment
)

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

Parameters

TShPoolNonPageAlignedBuffers aFlagNon-page aligned buffers
TUint aBufSizeSize in bytes of each buffer within the pool
TUint aInitialBufsInitial number of buffers allocated to the pool
TUint aAlignmentAlignment of the start of each buffer in the pool (shift/log2 value)

TShPoolCreateInfo()

TShPoolCreateInfo()[private]

Member Functions Documentation

SetExclusive()

IMPORT_C TIntSetExclusive()

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 TIntSetGuardPages()

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 TIntSetSizingAttributes(TUintaMaxBufs,
TUintaGrowTriggerRatio,
TUintaGrowByRatio,
TUintaShrinkHysteresisRatio
)

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 aMaxBufsThe maximum number of buffers that the pool can grow to. This value must not be less than aInitialBufs.
TUint aGrowTriggerRatioThis 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 aGrowByRatioThe 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 aShrinkHysteresisRatioThe 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]