/*******************************************************************************
*
* memPartShow - show partition blocks and statistics
*
* This routine displays statistics about the available and allocated memory
* in a specified memory partition. It shows the number of bytes, the number
* of blocks, and the average block size in both free and allocated memory,
* and also the maximum block size of free memory. It also shows the number
* of blocks currently allocated and the average allocated block size.
*
* In addition, if is 1, the routine displays a list of all the blocks
* in the free list of the specified partition.
*
* RETURNS: OK or ERROR.
*
* ERRNO: S_smObjLib_NOT_INITIALIZED
*
* SEE ALSO: memShow(),
* .pG "Target Shell,"
* windsh,
* .tG "Shell"
*/
STATUS memPartShow
(
PART_ID partId, /* partition ID */
int type /* 0 = statistics, 1 = statistics & list */
)
{
int numBlocks;
unsigned totalBytes = 0;
unsigned biggestWords = 0;