Memento is a simple library that can be built into a C (or C++) compile to help catch memory leaks, double frees, overwrites, etc. It offers features for interactive debugging within standard debuggers (like gdb, visual studio etc), includingL numbering allocations so that the same problems can be tracked over several runs. It will work nicely in conjunction with Valgrind for extra benefits. In addition it enables efficient memory squeezing tests.
It is akin to Fortify, but has some improvements.
make memento (or {gs,gcpl6,gxps}memento etc).
Binaries go into membin
.
Select the “Memento” configuration from the drop down and build as normal.
Binaries go in membin
make build=memento.
Binaries go into build/memento/
.
Select the “Memento” configuration from the drop-down and build as normal.
Binaries go in platform/win32/Memento/
.
Build the debug version of your project with “-DMEMENTO” and ensure that memento.h
is included in every single C file built.
Just run builds exactly as normal, and they will run as normal but (at about half speed).