Hullo there FreeBSD community,
I have written an application based on mprof, the memory profiler for Unix which was last updated in about 1989.
It's released under a BSD style license. It compiles unmodified on both Linux and FreeBSD.
Currently it only supports AMD64 processors.
I'd be extremely grateful if people could test it out on their C programs and report any bugs/crashes etc.. To fetch and install:
I'll just leave you with some excerpts from the README and the manual page.
mprof
C Memory Profiler
mprof is a rewrite of a classic Unix tool which analyses a C program's memory usage and prints out several detailed reports.
DESCRIPTION
mprof is a utility for examining the memory usage of C programs. It works by patching the libc functions
malloc(), calloc(), realloc() and free(); these functions are replaced with equivalents that gather statis‐
tics on memory (mis)use. When the program has finished executing, mprof outputs a memory usage report to a
file (this can be either a physical disk file or the error stream stderr).
I have written an application based on mprof, the memory profiler for Unix which was last updated in about 1989.
It's released under a BSD style license. It compiles unmodified on both Linux and FreeBSD.
Currently it only supports AMD64 processors.
I'd be extremely grateful if people could test it out on their C programs and report any bugs/crashes etc.. To fetch and install:
git clone https://www.github.com/SanctaMaria1997/mprof.git mprof
cd mprof
make
sudo make install
I'll just leave you with some excerpts from the README and the manual page.
mprof
C Memory Profiler
mprof is a rewrite of a classic Unix tool which analyses a C program's memory usage and prints out several detailed reports.
- Find memory leaks
- Quickly see which C files were responsible for leaks (including exact line numbers)
- Find out which functions (or chains of functions) are allocating/freeing/leaking the most memory (in terms of both function calls and bytes)
- Get a breakdown of memory chunk sizes to understand how your program uses memory
- Find out which C structs in your source code correspond to the memory your program allocates.
DESCRIPTION
mprof is a utility for examining the memory usage of C programs. It works by patching the libc functions
malloc(), calloc(), realloc() and free(); these functions are replaced with equivalents that gather statis‐
tics on memory (mis)use. When the program has finished executing, mprof outputs a memory usage report to a
file (this can be either a physical disk file or the error stream stderr).