How to measure memory usage inside any simple c++programm; | Sololearn: Learn to code for FREE!

+1

How to measure memory usage inside any simple c++programm;

Ex-#include<iostream> using namespace std; int main(){ cout<<" hello world"<<endl; return 0; } ###:- in this simple c++ programm I don't know how memory it will take .so I want to know how can I find it .

:-

8/15/2020 7:27:21 AM

AMIT KUMAR

1 Answer

New Answer

+2

You can use valgrind: https://stackoverflow.com/questions/131303/how-to-measure-actual-memory-usage-of-an-application-or-process#131346