Skip to content

lengerrong/SimpleMallocTrace

Repository files navigation

SimpleMallocTrace

Simple malloc trace to detect memory leak in a c/c++ program

Use dlsym() to hook libc malloc functions in attribute((constructor)) function which would be called before main(). Implementation malloc/free ... functions with the hooked functions and record memory alloc/free history, specially store backtrace for all alloced memory. Detect memory leak in attribute((distructor)) function which would be called after main().

About

Simple malloc trace to detect memory leak in a program

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages