You can get further information about entropy here.
Here is code of my program entropy.cpp: Read More
You can check your program using command:
valgrind your_programExample of usage:
We have following C++ program (tst.cpp):
int main() { int * tab = new int[1000000]; return 0; }
Obviously it generates memory leak. We compile it to tst file and execute:
valgrind tst