TShPoolInfo Class Reference

class TShPoolInfo

Defines the attributes of a pool.

Constructor & Destructor Documentation

TShPoolInfo()

IMPORT_CTShPoolInfo()

Member Data Documentation

TUint iAlignment

TUint iAlignment

Specifies the alignment for each buffer, as a shift count (log2 bytes).

For example, 9 means that each buffer is aligned on a 512-byte boundary.

TUint iBufSize

TUint iBufSize

Specifies the size of each buffer in the pool.

TUint iFlags

TUint iFlags

Specifies flags for the pool, as bit values from TShPoolCreateFlags or-ed together.

TShPoolCreateFlags

TUint iGrowByRatio

TUint iGrowByRatio

This specifies the proportion by which to grow the pool each time it is grown. If zero, the pool will not grow or shrink automatically.

It is expressed as a 32-bit fx24.8 fixed-point number, in the same way as iGrowTriggerRatio. Calculations are rounded down towards zero, but if calculating how many buffers to grow by yields 0, then the pool will be grown by 1 buffer.

TUint iGrowTriggerRatio

TUint iGrowTriggerRatio

This specifies when the pool grows. If zero, the pool will not grow or shrink automatically.

This is the proportion of free buffers left in the pool at which it should be grown. For example, if the ratio is 0.1, the pool will be grown when the number of free buffers drops to 10%.

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.) For the example given of 10%, use the value 26. It represents a value < 1 (i.e. must be < 256). Calculations are rounded down towards zero, but if calculating how many buffers to trigger on gives 0, the grow will be triggered when 1 buffer is free.

TUint iInitialBufs

TUint iInitialBufs

Specifies the initial number of buffers to be allocated to the pool.

TUint iMaxBufs

TUint iMaxBufs

Specifies the maximum number of buffers the pool can grow to.

TUint iShrinkHysteresisRatio

TUint iShrinkHysteresisRatio

The hysteresis value to ensure that the pool does not automatically shrink immediately after is grows.

Automatic shrinking will only happen when there are (iGrowTriggerRatio + iGrowByRatio) * iShrinkHysteresisRatio * (total buffers in the pool) free buffers left in the pool.

The amount by which the pool is shrunk depends on iGrowByRatio: it is the operational inverse, such that the pool would shrink down to the same number of buffers if shrunk immediately after growing (although hysteresis normally prevents this).

For example, if iGrowByRatio is 10%, a pool of 100 buffers would grow to 110 buffers. To shrink back to 100, a shrink ratio of 10/110 = 9% is required. That is, if the grow-by ration is G, the shrink-by ratio S is calculated as S = 1 - 1 / (1 + G).

iShrinkHysteresisRatio is a 32-bit fx24.8 fixed-point number in the same way as iGrowTriggerRatio and iGrowByRatio. It represents a value > 1 (i.e. must be > 256).

iGrowByRatio

TInt iSpare1

TInt iSpare1[private]

TInt iSpare2

TInt iSpare2[private]

TInt iSpare3

TInt iSpare3[private]

TInt iSpare4

TInt iSpare4[private]