MTuner is a C/C++ memory profiler and memory leak finder for Windows and other platforms
C++
2,786
104 commits
updated Jun 12, 2026
MTuner uses a novel approach to memory profiling: instead of sampling or keeping only a live snapshot, it records the entire time‑based history of memory operations. Every allocation, reallocation and free — together with its call stack, thread, heap and timestamp — is captured, so you can scrub through time and run queries over the whole data set rather than a single moment.
That history is what makes MTuner different from a typical "live heap" profiler: leaks, peaks, fragmentation, churn and short‑lived spikes are all visible after the fact, for any point or range in your program's run.
New in v5: an Insights tab that automatically analyzes a capture and surfaces ranked, explainable recommendations — leaks, churn, repeated reallocations, peak spikes, cross‑thread frees and more — each linking straight to the relevant stack trace and timeline. Plus faster, lighter loading of large captures and several new themes. See What's new in version 5.

addr2line/nm for GCC and Clang toolchains.The MTuner application — where you open and analyze captures — currently runs on Windows. Linux and macOS builds compile but are not yet functional (work in progress).
You capture from your application on one of the targets below, then analyze the result on Windows. Captures are portable, so you profile on the target and analyze on your desktop.
| Capture target | How |
|---|---|
| Windows | inject into a process, or link the SDK |
| Other | link the SDK |
The capture library also has Linux/macOS support, but the desktop application that reads captures is Windows‑only for now.
flowchart LR
A["Your application<br/>+ rmem capture library<br/>(injected on Windows, or linked via the SDK)"]
B[".MTuner capture<br/>LZ4-compressed<br/>operation stream"]
C["MTuner desktop app<br/>analysis and GUI (Qt)"]
R["rdebug symbol resolution<br/>PDB / DIA / symbol server<br/>addr2line / nm"]
A -- "alloc / free / realloc<br/>+ call stacks" --> B
B -- "load" --> C
R -- "resolve symbols" --> C
.MTuner capture file is the complete, replayable operation history.Pre‑built binaries are available on the releases page.
Note: if your application crashes while being profiled, try adding the MTuner folder to the Exclusions list under Virus & threat protection settings — some AV products interfere with the injected capture library.
git clone https://github.com/RudjiGames/MTuner.git
cd MTuner
git submodule update --init --recursive
There are two ways to capture:
linker and manual samples in the SDK.Either way, the result is a .MTuner capture file that you open in the desktop application to analyze.
MTuner uses the Qt framework for its user interface, so Qt must be installed on the build machine. The build system is based on GENie and zidar, which dramatically simplify managing build configurations and dependencies.
Building Qt‑based projects with zidar requires Lua to be installed.
After cloning the repository and its submodules:
> cd src/MTuner/scripts
> genie vs2022
The solution is generated at .zidar/windows/vs2022/MTuner/projects/vs2022/MTuner.sln (relative to the repository root).
$ cd src/MTuner/scripts
$ genie --gcc=mingw-gcc gmake
$ cd ../../../.zidar/windows/mingw-gcc/MTuner/projects/
$ make
The MINGW environment variable must be set and point to the MinGW installation directory. Tested with TDM64 MinGW using the OpenMP package.
Environment variables tell the build where Qt lives, for example:
set QTDIR_VS2022_x86=C:\<some_path>\Qt\6.9.3\msvc2022_64
set QTDIR_VS2022_x64=C:\<some_path>\Qt\6.9.3\msvc2022_64
Qt deprecated 32‑bit builds, which is why both variables point to the same (64‑bit) location.
Full documentation is available at RudjiGames.github.io/MTuner.
MTuner is released under the BSD 2‑clause license.
Copyright 2023 Milos Tosic. All rights reserved.
https://github.com/RudjiGames/MTuner
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(top 24 of 45)
1,506 followers · starred Aug 2017
8,202 followers · starred Aug 2017
303 followers · starred Jan 2025
137 followers · starred Nov 2018
MTuner is a C/C++ memory profiler and memory leak finder for Windows and other platforms
C++
2,786
104 commits
updated Jun 12, 2026
MTuner uses a novel approach to memory profiling: instead of sampling or keeping only a live snapshot, it records the entire time‑based history of memory operations. Every allocation, reallocation and free — together with its call stack, thread, heap and timestamp — is captured, so you can scrub through time and run queries over the whole data set rather than a single moment.
That history is what makes MTuner different from a typical "live heap" profiler: leaks, peaks, fragmentation, churn and short‑lived spikes are all visible after the fact, for any point or range in your program's run.
New in v5: an Insights tab that automatically analyzes a capture and surfaces ranked, explainable recommendations — leaks, churn, repeated reallocations, peak spikes, cross‑thread frees and more — each linking straight to the relevant stack trace and timeline. Plus faster, lighter loading of large captures and several new themes. See What's new in version 5.

addr2line/nm for GCC and Clang toolchains.The MTuner application — where you open and analyze captures — currently runs on Windows. Linux and macOS builds compile but are not yet functional (work in progress).
You capture from your application on one of the targets below, then analyze the result on Windows. Captures are portable, so you profile on the target and analyze on your desktop.
| Capture target | How |
|---|---|
| Windows | inject into a process, or link the SDK |
| Other | link the SDK |
The capture library also has Linux/macOS support, but the desktop application that reads captures is Windows‑only for now.
flowchart LR
A["Your application<br/>+ rmem capture library<br/>(injected on Windows, or linked via the SDK)"]
B[".MTuner capture<br/>LZ4-compressed<br/>operation stream"]
C["MTuner desktop app<br/>analysis and GUI (Qt)"]
R["rdebug symbol resolution<br/>PDB / DIA / symbol server<br/>addr2line / nm"]
A -- "alloc / free / realloc<br/>+ call stacks" --> B
B -- "load" --> C
R -- "resolve symbols" --> C
.MTuner capture file is the complete, replayable operation history.Pre‑built binaries are available on the releases page.
Note: if your application crashes while being profiled, try adding the MTuner folder to the Exclusions list under Virus & threat protection settings — some AV products interfere with the injected capture library.
git clone https://github.com/RudjiGames/MTuner.git
cd MTuner
git submodule update --init --recursive
There are two ways to capture:
linker and manual samples in the SDK.Either way, the result is a .MTuner capture file that you open in the desktop application to analyze.
MTuner uses the Qt framework for its user interface, so Qt must be installed on the build machine. The build system is based on GENie and zidar, which dramatically simplify managing build configurations and dependencies.
Building Qt‑based projects with zidar requires Lua to be installed.
After cloning the repository and its submodules:
> cd src/MTuner/scripts
> genie vs2022
The solution is generated at .zidar/windows/vs2022/MTuner/projects/vs2022/MTuner.sln (relative to the repository root).
$ cd src/MTuner/scripts
$ genie --gcc=mingw-gcc gmake
$ cd ../../../.zidar/windows/mingw-gcc/MTuner/projects/
$ make
The MINGW environment variable must be set and point to the MinGW installation directory. Tested with TDM64 MinGW using the OpenMP package.
Environment variables tell the build where Qt lives, for example:
set QTDIR_VS2022_x86=C:\<some_path>\Qt\6.9.3\msvc2022_64
set QTDIR_VS2022_x64=C:\<some_path>\Qt\6.9.3\msvc2022_64
Qt deprecated 32‑bit builds, which is why both variables point to the same (64‑bit) location.
Full documentation is available at RudjiGames.github.io/MTuner.
MTuner is released under the BSD 2‑clause license.
Copyright 2023 Milos Tosic. All rights reserved.
https://github.com/RudjiGames/MTuner
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(top 24 of 45)
1,506 followers · starred Aug 2017
8,202 followers · starred Aug 2017
303 followers · starred Jan 2025
137 followers · starred Nov 2018