The following example shows sample output from the
show memory heap command, specifying the
summary job-id keyword and argument:
RP/0/0/CPU0:router# show memory heap summary 65
Malloc summary for pid 20495 process pcmciad:
Heapsize 65536: allocd 40332, free 16568, overhead 8636
Calls: mallocs 883; reallocs 3; frees 671; [core-allocs 4; core-frees 0]
Band size 16, element per block 48, nbuint 1
Completely free blocks: 0
Block alloced: 2, Block freed: 0
allocs: 85, frees: 20
allocmem: 1040, freemem: 496, overhead: 448
blocks: 2, blknodes: 96
Band size 24, element per block 34, nbuint 1
Completely free blocks: 0
Block alloced: 1, Block freed: 0
allocs: 243, frees: 223
allocmem: 480, freemem: 336, overhead: 168
blocks: 1, blknodes: 34
Band size 32, element per block 26, nbuint 1
Completely free blocks: 0
Block alloced: 1, Block freed: 0
allocs: 107, frees: 97
allocmem: 320, freemem: 512, overhead: 136
blocks: 1, blknodes: 26
Band size 40, element per block 22, nbuint 1
Completely free blocks: 0
Block alloced: 2, Block freed: 0
allocs: 98, frees: 74
allocmem: 960, freemem: 800, overhead: 240
blocks: 2, blknodes: 44
Band size 48, element per block 18, nbuint 1
Completely free blocks: 0
Block alloced: 1, Block freed: 0
allocs: 53, frees: 42
allocmem: 528, freemem: 336, overhead: 104
blocks: 1, blknodes: 18
Band size 56, element per block 16, nbuint 1
Completely free blocks: 0
Block alloced: 1, Block freed: 0
allocs: 8, frees: 4
allocmem: 224, freemem: 672, overhead: 96
blocks: 1, blknodes: 16
Band size 64, element per block 14, nbuint 1
Completely free blocks: 0
Block alloced: 1, Block freed: 0
allocs: 6, frees: 2
allocmem: 256, freemem: 640, overhead: 88
blocks: 1, blknodes: 14
Band size 72, element per block 12, nbuint 1
Completely free blocks: 0
Block alloced: 1, Block freed: 0
allocs: 1, frees: 0
allocmem: 72, freemem: 792, overhead: 80
blocks: 1, blknodes: 12
Table 12 show memory heap summary Field Descriptions
Field |
Description |
Malloc summary for pid |
System-defined process ID (pid). |
Heapsize |
Size of the heap as allocated from the system by the malloc library. |
allocd |
Bytes allocated to the process. |
free |
Bytes available in the heap. |
overhead |
Malloc library overhead in bytes. |
mallocs |
Number of malloc calls. |
reallocs |
Number of realloc calls. |
frees |
Number of invocations to the caller interface provided in the malloc library for deallocating the memory. |
[core-allocs 1; core-frees 0] |
Number of core memory units, the memory units in the malloc library allocated by the system for the heap, allocated and freed. |
Band size |
Small memory elements are arranged in bands. The band size specifies the size of elements within the band. |
element per block |
Number of elements per block in the band. |
nbunit |
Number of memory unit one block consists of. Any block in any band should be of a size that is an integer multiple of this basic unit. |
Completely free blocks |
Number of blocks in the band completely free (available for allocation). |
Block alloced |
Number of blocks currently allocated for the band. |
allocs |
Number of allocations currently performed from the band. |
frees |
Number of free calls that resulted in memory being returned to the band. |
allocmem |
Amount of memory currently allocated from the band. |
overhead |
Amount of memory in bytes as overhead for managing the band. |
blocks |
Number of blocks currently in the band. |
blknodes |
Number of nodes (elements) in all the blocks in the band. |