Skip to content

Using the dynamic library piling method to perform library piling on the malloc calloc realloc free function can achieve memory analysis. It can be analyzed without modifying the code of the running program.

Notifications You must be signed in to change notification settings

Religious-J/mperf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mperf

Using the dynamic library piling method to perform library piling on the malloc calloc realloc free function can achieve memory analysis.

How to use?

Assume the file is located in /home/usr/mperf

COMPILE

Easily compile the code using compile.sh script

cd ./code
sh compile.sh

RUN

Add LD_PRELOAD = your_pth/mperf.so before run run.sh script

LD_PRELOAD=/home/usr/mperf/code/mperf.so ./run.sh

ANALYSE

Visual processing can be done using the provided python script

LD_PRELOAD=/home/usr/mperf/code/mperf.so ./run.sh | python /home/usr/mperf/draw/dispatch.py

python /home/usr/mperf/draw/draw.py

After that can get an output like this: 示例图片

ps. If do not output the function call stack information, please use ./code/mperf_less.cc instead, it will greatly reduce the running time and the size of the generated analysis file.

Library Interpositioning (CSAPP):

https://hansimov.gitbook.io/csapp/part2/ch07-linking/7.13-library-interpositioning

About

Using the dynamic library piling method to perform library piling on the malloc calloc realloc free function can achieve memory analysis. It can be analyzed without modifying the code of the running program.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published