I have a simple program which only calls getrusage
and prints a few values. I then run the program
and compare the output against what size(1)
returns. This is what I got:
$ ./a.out
max resident set size: 1312
integral shared text memory size: 288
integral unshared data size: 188
integral unshared stack size: 128
$ size a.out
text data bss dec hex filename
1644 196 272 2112 840 a.out
Can someone explain why these figures don't
match? I'd expect at least "text" and "data" to
look alike, but they really don't...