A simple alternative to valgrind/memcheck that keeps track of malloc'd, calloc'd, realloc'd, and free'd memory and prints a diagnostic message at the end of program execution.
Find a file
2024-06-04 12:13:12 +09:00
src Remove unnecessary comments 2024-06-04 12:06:48 +09:00
CMakeLists.txt Add CMakeLists.txt 2024-06-04 12:05:10 +09:00
LICENSE ADD README.md and LICENSE 2024-06-04 12:13:12 +09:00
README.md ADD README.md and LICENSE 2024-06-04 12:13:12 +09:00

AnotherMemCheck

This software was created as an alternative to valgrind/memcheck.

Usage

  1. Build this software with cmake.

  2. Assuming the output library is called libAnotherMemCheck.so, run your program with the LD_PRELOAD environment variable set to this library.

     LD_PRELOAD=path/libAnotherMemCheck.so ./myProgram
    
  3. When the program exits, there should be diagnostic output from this library showing all memory that has been malloced and not freeed. Note that some memory will always be shown as having been not freeed (e.g. initializing heap stuff for the program at start).