GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
LMDBG-STAT(1) LMDBG-STAT(1)

lmdbg-stat - outputs statistical information based on lmdbg-run output

lmdbg-stat [OPTIONS] [files...]

lmdbg-stat takes output of lmdbg-run or other lmdbg-* utilities on input and outputs total and per-stacktrace statistical information about memory allocations. The following statistics is output:

Per-stacktrace or total number of memory allocations
Per-stacktrace or total maximum of requested bytes
Per-stacktrace or total peak of allocated memory
Per-stacktrace or total amount of bytes that were allocated but not freed

Display the help message.
Display the lmdbg version.

$ cat -n testme.c

1 #include <stdlib.h>
2
3 int main ()
4 {
5 int i;
6 void *p1, *p2;
7 p1 = malloc (100);
8 for (i=0; i < 3; ++i){
9 p2 = realloc (NULL, 10+30*i);
10 }
11 free (p1);
12 free (p2);
13
14 return 0;
15 } $ cc -O0 -g -o testme testme.c $ lmdbg-run -o log -f 'lmdbg-stat | lmdbg-sym' ./testme $ cat log info stat total_leaks: 50 info stat total_allocs: 4 info stat total_free_cnt: 2 stacktrace peak: 120 max: 70 allocs: 3 leaks: 50
0xbbbe2bc3 lmdbg.c:101 log_stacktrace
0xbbbe3498 lmdbg.c:456 realloc
0x8048788 testme.c:9 main
0x80485b4
0x8048517 stacktrace peak: 100 max: 100 allocs: 1
0xbbbe2bc3 lmdbg.c:101 log_stacktrace
0xbbbe33bd lmdbg.c:431 malloc
0x8048757 testme.c:7 main
0x80485b4
0x8048517 $

lmdbg(1), lmdbg-run(1), lmdbg-sym(1), lmdbg-sort(1), lmdbg-grep(1), lmdbg-leaks(1), lmdbg-sysleaks(1), lmdbg-strip(1), lmdbg-modules(1)

Aleksey Cheusov <vle@gmx.net>

November 26, 2011

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.