-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
22 lines (18 loc) · 802 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
malloc and free tracer to detect memory leaks
USAGE:
$ LD_PRELOAD=/somewhere/malloc_tracer.so target_executable
DESCRIPTION:
With this wrapper working as preloaded module, a target application
prints out memory allcation to a file.
By analyzing the file, you can find memory leaks, if any, and the
caller address of malloc where memory is not reclaimed.
File sample is following.
m 0x00000000008b22f0 0x0000000000000064 0x00007fca5ec17674 0x0000000000400a5b
f 0x00000000008b2280 0x0000000000000000 0x00007fca5ec1768e 0x0000000000400aa1
where ...
1st column: [m]alloc or [f]ree
2nd column: address of memory region which is malloc-ed or free-ed
3rd column: size of memory region malloc-ed in case of malloc,
always 0 in case of free
the rest: callstack
TODO: