What is Memento?

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.

Building Memento builds

GS on Unix

make memento (or {gs,gcpl6,gxps}memento etc).

Binaries go into membin.

GS on Windows

Select the “Memento” configuration from the drop down and build as normal.

Binaries go in membin

MuPDF on Unix

make build=memento.

Binaries go into build/memento/.

MuPDF on Windows

Select the “Memento” configuration from the drop-down and build as normal.

Binaries go in platform/win32/Memento/.

New projects

Build the debug version of your project with “-DMEMENTO” and ensure that memento.h is included in every single C file built.

Running Memento builds

Just run builds exactly as normal, and they will run as normal but (at about half speed).