Skip to content

A memory leak detector for unix-based operating systems.

License

Notifications You must be signed in to change notification settings

Dfmaaa/memleakd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memleakd

This project is supposed to be a memory leak detector for me, but I've tried to make it more stranger-friendly with configuration macros defined in mhshim.h.

How to use it?

It's simple. First you need to understand how the memory leak detector works. It's a shim. It edits the functions malloc, calloc, realloc, free. What are the modifications? It uses a linked list to store void pointers and their sizes. It's not like the original allocation and deallocation functions aren't being used. They're also being used with the help of dlsym.

So what do I need to know in order to use it?

You need to know how to execute bash scripts(for compilation). You also need to know what environment variables are. More specifically, what LD_PRELOAD is. After compilation is done, you should see a .so file. That is a shared object file. You need to set LD_PRELOAD to ./(shared object path) ./(target executable). This will be automated in the future with the help of functions like setenv, fork, execvp.

NOTE

This only works on unix-based operating systems.

About

A memory leak detector for unix-based operating systems.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published