RMBufAllocator Class Reference

class RMBufAllocator : public TCommsBufAllocator

RMBufAllocator provides a handle that can be used to speed RMBufChain allocation. Without this handle every allocation internally accesses thread local storage. Creation of the RMBufAllocator handle uses thread local storage but subsequent RMBufChain allocations using this handle don't.

RMBufAllocator also provides information about the state of the RMBuf free pools, each size of RMBuf has a different free pool.

Inherits from

Public Member Functions
RMBufAllocator()
IMPORT_C TIntBytesAvailable()
IMPORT_C TIntBytesAvailable(TInt)
IMPORT_C TIntLargestMBufSize()
IMPORT_C TIntNextMBufSize(TInt)

Constructor & Destructor Documentation

RMBufAllocator()

IMPORT_CRMBufAllocator()

Member Functions Documentation

BytesAvailable()

IMPORT_C TIntBytesAvailable()const

Obtains the total available bytes available in the mbuf system in it's entirety.

BytesAvailable(TInt)

IMPORT_C TIntBytesAvailable(TIntaSize)const

Obtains the total bytes available in the pool of the given sized MBuf.

Parameters

TInt aSizeone of the sizes returned by RMBufAllocator::NextMBufSize().

LargestMBufSize()

IMPORT_C TIntLargestMBufSize()const

NextMBufSize(TInt)

IMPORT_C TIntNextMBufSize(TIntaSize)const

Returns the first MBuf size that is greater than aSize, returns KErrNotFound if there isn't an MBuf whose size is larger than aSize. Can be used to find the size of each of the MBuf pools by starting at 0 and repeatedly passing in the result of the previous call until KErrNotFound occurs.

Parameters

TInt aSizea starting size to search upwards from.