Debugging a Program With dbx

showmemuse

This command generates a report showing all blocks of memory in use:


showmemuse [-a] [-m m
] [-n num]
[-v]

Report the top num blocks-in-use records sorted by size. Only blocks that are new since the last showmemuse command are shown.

-a

Shows all blocks in use so far. 

-m m

Used for combining the blocks-in-use reports; if the call stack at the time of allocation for two or more blocks matches m frames, then the blocks are reported in a single combined report. The -m option overrides the global value of m specified with the check command. The default value of m is 2 or the global value last given with check.

-n num

Shows up to num records in the report. Default is to show 20.

-v

Generates verbose output. Default is to show non-verbose output. 

When memory use checking is on, at program exit an implicit showmemuse -a -n 20 is performed. You can get a verbose output at the program exit time by using the rtc_biu_at_exit dbxenv variable.