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.
Constructor & Destructor Documentation
Member Functions Documentation
BytesAvailable()
IMPORT_C TInt | BytesAvailable | ( | ) | const |
Obtains the total available bytes available in the mbuf system in it's entirety.
BytesAvailable(TInt)
IMPORT_C TInt | BytesAvailable | ( | TInt | aSize | ) | const |
Obtains the total bytes available in the pool of the given sized MBuf.
Parameters
TInt aSize | one of the sizes returned by RMBufAllocator::NextMBufSize(). |
LargestMBufSize()
IMPORT_C TInt | LargestMBufSize | ( | ) | const |
NextMBufSize(TInt)
IMPORT_C TInt | NextMBufSize | ( | TInt | aSize | ) | 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 aSize | a starting size to search upwards from. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.