Skip to content

imsut/malloc-tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

malloc and free wrapper for memory leak detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published