A single file drop-in memory leak tracking solution for C++ on Windows

MemLeakTracker

A single file drop-in memory leak tracking solution for C++ on Windows

This small piece of code allows for global memory leak tracking on Windows.

Use: Simply place this CPP in your solution and have it compile with the rest of the code. A to-the-point memory leak report will be presented in the debug output upon exit.

This code works by overriding the global new and delete operators so if your project already did that there will be some linker errors to resolve.

There is a performance hit associated with using this code which is why the default configuration disables tracking for release builds. If you only want to see if there are memory leaks at all the stack tracing can be disabled to improve performance.

Limitations: this code only tracks new and delete calls in their many forms. malloc/HeapAlloc/etc functions aren't tracked but can be easily added through proxy calls - see the bottom of the CPP for the new/delete implementations. The tracking in this code will also not see through dll boundaries.

May it serve you as well as it did me.

Similar Resources

A memory allocation program, it is used for doing an experiment to find out the detail of Microsoft Windows taskmgr performance information

A memory allocation program, it is used for doing an experiment to find out the detail of Microsoft Windows taskmgr performance information

memory-allocation-test A memory allocation program, it is used for doing an experiment to find out the detail of Microsoft Windows taskmgr performance

Dec 22, 2022

Using shared memory to communicate between two executables or processes, for Windows, Linux and MacOS (posix). Can also be useful for remote visualization/debugging.

shared-memory-example Using shared memory to communicate between two executables or processes, for Windows, Linux and MacOS (posix). Can also be usefu

Aug 17, 2022

STL compatible C++ memory allocator library using a new RawAllocator concept that is similar to an Allocator but easier to use and write.

memory The C++ STL allocator model has various flaws. For example, they are fixed to a certain type, because they are almost necessarily required to b

Dec 26, 2022

Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C

Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C

rpmalloc - General Purpose Memory Allocator This library provides a public domain cross platform lock free thread caching 16-byte aligned memory alloc

Dec 28, 2022

OpenXenium JTAG and Flash Memory programmer

OpenXenium JTAG and Flash Memory programmer

OpenXenium JTAG and Flash Memory programmer * Read: "Home Brew" on ORIGINAL XBOX - a detailed article on why and how * The tools in this repo will all

Oct 23, 2022

manually map driver for a signed driver memory space

smap manually map driver for a signed driver memory space credits https://github.com/btbd/umap tested system Windows 10 Education 20H2 UEFI installati

Dec 17, 2022

Memory instrumentation tool for android app&game developers.

Memory instrumentation tool for android app&game developers.

Overview LoliProfiler is a C/C++ memory profiling tool for Android games and applications. LoliProfiler supports profiling debuggable applications out

Jan 6, 2023

Dump the memory of a PPL with a userland exploit

Dump the memory of a PPL with a userland exploit

PPLdump This tool implements a userland exploit that was initially discussed by James Forshaw (a.k.a. @tiraniddo) - in this blog post - for dumping th

Dec 29, 2022

Implementation of System V shared memory (a type of inter process communication) in xv6 operating system.

NOTE: we have stopped maintaining the x86 version of xv6, and switched our efforts to the RISC-V version (https://github.com/mit-pdos/xv6-riscv.git)

Feb 21, 2022
MemoryLeakDetector is a native memory leak monitoring tool developed by Xigua video android team
MemoryLeakDetector is a native memory leak monitoring tool developed by Xigua video android team

MemoryLeakDetector is a native memory leak monitoring tool developed by Xigua video android team. It has simple access, wide monitoring range, excellent performance and good stability. It is widely used in native-memory-leak-governance of ByteDance's major apps, and the benefits are significant!

Jan 6, 2023
A tool for tracking memory allocation based ld-preload

libmallocTrace A tool for tracking memory allocation based ld-preload how to build make cd example && make how to use a simple way is to execute some

Mar 12, 2022
MMCTX (Memory Management ConTeXualizer), is a tiny (< 300 lines), single header C99 library that allows for easier memory management by implementing contexts that remember allocations for you and provide freeall()-like functionality.

MMCTX (Memory Management ConTeXualizer), is a tiny (< 300 lines), single header C99 library that allows for easier memory management by implementing contexts that remember allocations for you and provide freeall()-like functionality.

Oct 2, 2021
The Hoard Memory Allocator: A Fast, Scalable, and Memory-efficient Malloc for Linux, Windows, and Mac.

The Hoard Memory Allocator Copyright (C) 1998-2020 by Emery Berger The Hoard memory allocator is a fast, scalable, and memory-efficient memory allocat

Jan 2, 2023
Custom memory allocators in C++ to improve the performance of dynamic memory allocation
Custom memory allocators in C++ to improve the performance of dynamic memory allocation

Table of Contents Introduction Build instructions What's wrong with Malloc? Custom allocators Linear Allocator Stack Allocator Pool Allocator Free lis

Jan 2, 2023
Memory-dumper - A tool for dumping files from processes memory

What is memory-dumper memory-dumper is a tool for dumping files from process's memory. The main purpose is to find patterns inside the process's memor

Nov 9, 2022
Mesh - A memory allocator that automatically reduces the memory footprint of C/C++ applications.
Mesh - A memory allocator that automatically reduces the memory footprint of C/C++ applications.

Mesh: Compacting Memory Management for C/C++ Mesh is a drop in replacement for malloc(3) that can transparently recover from memory fragmentation with

Dec 30, 2022
PoC for CVE-2021-32537: an out-of-bounds memory access that leads to pool corruption in the Windows kernel.
PoC for CVE-2021-32537: an out-of-bounds memory access that leads to pool corruption in the Windows kernel.

CVE-2021-32537: Out-of-bounds access in RTKVHD64 leading to pool corruption. This is a bug that I reported to Realtek beginning of April 2021. The aff

Aug 23, 2022
A simple windows driver that can read and write to process memory from kernel mode

ReadWriteProcessMemoryDriver A simple windows driver that can read and write to process memory from kernel mode This was just a small project for me t

Dec 7, 2022
Modern C++ 32bit Windows Process Memory Library.
Modern C++ 32bit Windows Process Memory Library.

basil Simple 32-bit Windows Process Memory Library. Written in Modern C++. JavaScript bindings basil (wilL) be available as bindings for JavaScript. C

Jul 5, 2022