Skip to content

Pratham1812/MemSneak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MemSneak

This tool is used to sneak for memory leaks in a process. It traces outstanding memory allocations that were not freed by a process. It supports both user mode allocations and kernel mode allocations. Currently supporting memory allocation performed with various libc functions and also kernel mode functions like kmalloc/kmem_cache_alloc/get_free_pages.

It also maintains the count of various memory allocation functions.

Setup

You must have bcc installed on your machine in order to run this tracer.

To install bcc, follow the instructions given on this link.

Clone the repository and navigate to the folder. Then run

pip install -r requirements.txt

Running the tool

Possible options image

To run sample binary in examples/ directory

sudo python3 memSneak.py -c "./example/main" 

Pass the --freq flag to count the frequency of each allocation image

To run the tool on all the kernel processes

sudo python3 memSneak.py

image

To run the tool for specific PID

sudo python3 memSneak.py -p <PID>

To lookout for more options

sudo python3 memSneak.py -h

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published