- Memory consumption in cc1/cc1plus at -Ox -g over that set of apps.
Wouldn't this be expected to be strongly correlated with the above? Is
-fmem-report processed by mem-stats what you're after?
People usually just look at top's output, but Honza has a memory tester
so I thought maybe you can script it... Indeed here is a script to do that
#! /bin/bash
trap 'test -n $pid && kill -TERM $pid 2>/dev/null; :' 0 TERM INT
"$@" &
pid=$!
vsize=
rss=
while :; do
set `cat /proc/$pid/statm 2>/dev/null || echo break`
test $1 = break && break
test $1 -gt ${vsize:-0} && vsize=$1
test $2 -gt ${rss:-0} && rss=$2
sleep 1
done
test -n "$vsize" && echo max. vmsize: $(($vsize * 4)) Kb >&2
test -n "$rss" && echo max. rss: $(($rss * 4)) Kb >&2
Paolo