header-only, minimalistic vector implementation to lock heap allocated memory in RAM and also zero out the sensitive data where needed.
#include "mvector.hpp"
mvector<double> high_secret_doubles;Calls the POSIX standard mlock to prevent the vector internal memory from being swapped out from RAM
Instead of std::fill_n,
explicit_memset could be used.