Code:
grep -i ram.*byte /var/log/XFree86.0.log|awk '{print $4, $5}'
yields "65536 kByte" (laptop, Radeon), which is the physical amount of RAM.
Lspci OTOH shows what's actually in use (AFAIK):
Code:
VGA=`/sbin/lspci | grep "VGA.compatible.controller"|awk '{print $1}'`
MEM=`/sbin/lspci -v -v -s $VGA|grep -m1 gion.*pref.*size|awk '{print $NF}'`
MEM=${MEM//*=/}; MEM=${MEM%%]}; echo "Memory: ${MEM}"
a total of 128M (incl. BIOS configured mem share).