Skip to content
Advertisement

Memory used by compiling a code

I use time command to measure the time used to execute a file as:

     time ./filename  

My question: are there any command like time can give the memory used by executing an executable file in linux?

Advertisement

Answer

You can use /usr/bin/time -v ./filename. It will print a lot of information including memory use.

Note:

time ./filename

Will use the shell built-in time command.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement