You are not logged in.

#1 2012-03-02 15:40:48

kdar
Member
From: Sweet home Alabama!
Registered: 2009-06-27
Posts: 356

Measuring static memory allocation? (from a CLI)

How do I measure static memory allocation from something that I run in a shell?

For example if I want to run gzip and measure how much memory its using during compression?

Is there anything like 'time' for memory measurements?

Offline

#2 2012-03-02 16:46:14

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: Measuring static memory allocation? (from a CLI)

The GNU version of 'time' can do this.  Install the package 'extra/time'.  To avoid the bash builtin, call 'time' using the full path:

$ /usr/bin/time -f "%Mkb MaxMem" tar -xf md5deep.tar.gz
1048kb MaxMem

Offline

Board footer

Powered by FluxBB