On Tuesday 06 May 2008 08:37:36 am Bernhard Graf wrote: > With softlimit (and ulimit) one can set several memory limits, most > interesting data and stack segment. > > How do I determine the actual memory consumption for data and stack of a > process? > With tools like ps and top I only get code + data + stack summed up. Something like pmap? rwoodrum@frums:~$ pmap -d 888 888: /bin/bash Address Kbytes Mode Offset Device Mapping 08048000 664 r-x-- 0000000000000000 008:00001 bash 080ee000 20 rw--- 00000000000a6000 008:00001 bash 080f3000 2572 rw--- 00000000080f3000 000:00000 [ anon ] b7c67000 28 r--s- 0000000000000000 008:00005 gconv-modules.cache b7c6e000 212 r--s- 0000000000000000 008:00006 passwd b7ca3000 1256 r---- 0000000000000000 008:00005 locale-archive b7ddd000 4 rw--- 00000000b7ddd000 000:00000 [ anon ] b7dde000 1312 r-x-- 0000000000000000 008:00001 libc-2.7.so b7f26000 4 r---- 0000000000148000 008:00001 libc-2.7.so b7f27000 8 rw--- 0000000000149000 008:00001 libc-2.7.so b7f29000 16 rw--- 00000000b7f29000 000:00000 [ anon ] b7f2d000 8 r-x-- 0000000000000000 008:00001 libdl-2.7.so b7f2f000 8 rw--- 0000000000001000 008:00001 libdl-2.7.so b7f31000 184 r-x-- 0000000000000000 008:00001 libncurses.so.5.6 b7f5f000 12 rw--- 000000000002d000 008:00001 libncurses.so.5.6 b7f77000 8 rw--- 00000000b7f77000 000:00000 [ anon ] b7f79000 104 r-x-- 0000000000000000 008:00001 ld-2.7.so b7f93000 8 rw--- 0000000000019000 008:00001 ld-2.7.so bfd11000 84 rw--- 00000000bffeb000 000:00000 [ stack ] ffffe000 4 r-x-- 0000000000000000 000:00000 [ anon ] mapped: 6516K writeable/private: 2740K shared: 240K