Native Inspect Manual (H06.13+, J06.03+)
5. To view a specific allocation, specify the allocation number as an argument to the info
heap command. For example:
(eInspect 0,248)info heap 1
4096 bytes at 0x7bd63000 (9.86%of all bytes allocated)
in bar ()at test.c:108
in main ()at test.c:17
in _start ()
in $START$()
When multiple blocks are allocated from the same call stack, Native Inspect displays
additional information similar to the following:
(eInspect 0,248)info heap 3
245 bytes in 8 blocks (0.59% of all bytes allocated)
These range in size from 26 to 36 bytes and are allocated
in boo ()
in link_the_list ()at test.c:55
in main ()at test.c:13
in _start ()
You can control the stack frames that are collected for reporting at any allocation point.
For more information on this feature, see the Debugging Dynamic Memory Usage Errors
Using HP WDB white paper located at the HP WDB Documentation webpage: http://
www.hp.com/go/WDB.
• To use the info heap command with the min-heap-size filter setting.
NOTE: min-heap-size is described under the set heap-check Command (memory leak
detection) (page 115).
Sample program:
1 #include stdio.h
2 #include stdlib.h
3 main()
4 {
5 int i, *arr[1000 ];
6 for (i=0; i < 1000; i++)
7 arr[i] = malloc (49);
8 malloc (30);
9 set_brkpt_here(0)
10 exit(0);
11 12 }
Sample debugging session:
For 32-bit application:
TACL> rund minheap /lib $system.sys00.zrtcdll/
(eInspect 0,248)b set_brkpt_here
(eInspect 0,248)set heap-check min-heap-size 31
(eInspect 0,248)run
(eInspect 0,248)info heap
Analyzing heap …
49000 bytes allocated in 1000 blocks
No. Total bytes Blocks Address Function
0 49000 1000 0x4044eff0 main()
For 64-bit application:
TACL> run –minheap –lib=/G/system/sys00/yrtcdll/
(eInspect 0,248)b set_brkpt_here
(eInspect 0,248)set heap-check min-heap-size 31
(eInspect 0,248)run
(eInspect 0,248)info heap
Analyzing heap …
49000 bytes allocated in 1000 blocks
92 Native Inspect Command Syntax










