Examples
This example shows sample output from the show memory heap command, specifying a job ID for the job-id argument:
Router# show memory heap 111
Malloc summary for pid 16433:
Heapsize 16384: allocd 6328, free 8820, overhead 1236
Calls: mallocs 144; reallocs 73; frees 5; [core-allocs 1; core-frees 0]
Block Allocated List
Total Total Block Name/ID/Caller
Usize Size Count
0x000008c1 0x000008cc 0x00000001 0x7c018a10
0x000005ac 0x00000974 0x00000079 0x7c02b9e0
0x000004f0 0x000004f8 0x00000001 0x7c02b6fc
0x00000080 0x00000088 0x00000001 0x7c01936c
0x00000034 0x00000048 0x00000001 0x7c018954
0x00000024 0x00000030 0x00000001 0x7c019278
0x00000018 0x00000020 0x00000001 0x7c019b2c
0x00000008 0x00000010 0x00000001 0x7c017178
0x00000008 0x00000010 0x00000001 0x7c00fb54
0x00000008 0x00000010 0x00000001 0x7c00fb80
0x00000008 0x00000010 0x00000001 0x7c00fbb8
Table 9. show memory heap 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.
|
The following example shows sample output from the show memory heap command, specifying the summary
job-id keyword and argument:
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 10. 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.
|