This example implements main programs that demonstrate performance of large arrays and can also be used to check for memory leaks. Checking for memory leaks can be accomplished by running the programs with valgrind or some other memory check program.
Read exampleCPP/documentation/arrayPerformance.html