Added simple memory profiler.