This topic describes the metrics provided by a Comms pond.
A Comms pond creates and manages pools of Comms buffers (MBufs). Each pool contain buffers of a specified size. The pond provides information about the size of these buffers and the memory utilisation of the pools.
Metric method | Description |
---|---|
Returns the next MBuf size that is strictly larger than the specified parameter, or KErrNotFound if there is no pool with larger buffers. The return value is independent from the number of free buffers of that size. To obtain the first size, pass 0 as the parameter. |
|
Returns the largest buffer size in the pond. The return value is independent from the amount of free buffers in the largest-size pool. |
|
Returns the sum of the amount of available memory in all the pools. |
|
Returns the amount of available memory in the first pool of the specified buffer size. To get the number of free buffers in the pool, divide the return value by the buffer size. |
To get the list of the existing buffer sizes, call NextBufSize() as in the following example:
RMBufAllocator allocator; TInt size = 0; do { // Get the next size size = allocator.NextBufSize(size); // error if(size <0) { // no pool of bigger buffers, or error: end iteration break; } RDebug::Printf(ā%dā,size); } while(true);
Note that the example uses a RMBufAllocator object instead of the pond: this optimisation is explained in the TLS Look-up Reduction Tutorial .
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.