Fame(2)

May. 24th, 2010 02:34 pm
ewx: (poll)

Ignoring people who only got one vote. The men:

6.5Barack Obama
3.5The Pope
2Nelson Mandela

The women:

6Queen Elizabeth II
3Madonna
2Hillary Clinton
ewx: (geek)

I noticed, on my 64-bit Linux system, that gnome-panel was apparently using an awful lot of virtual memory.

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 3734 rjk       20   0  290m  16m 6668 S    0  0.8   3:22.05 gnome-panel

Virtual memory’s pretty cheap, so that’s not hugely problematic, but it seemed a huge amount for a glorified toolbar. I looked in /proc/3734/maps and found that about 260MB of that space belonged to shared libraries. Now, gnome-panel does use a lot of library, 82 to be precise, but 3MB per library sounded a lot, and the biggest of them is only 4MB. Looking closer I noticed that an awful lot of the libraries had 2MB (0x200000) non-executable mappings associated with them. As an example here are the mappings for GTK+ (with the size in hex added at the start for convenience):

3c7000 7f967efd6000-7f967f39d000 r-xp 00000000 fe:00 3111259  /usr/lib/libgtk-x11-2.0.so.0.1200.12
200000 7f967f39d000-7f967f59d000 ---p 003c7000 fe:00 3111259  /usr/lib/libgtk-x11-2.0.so.0.1200.12
  a000 7f967f59d000-7f967f5a7000 rw-p 003c7000 fe:00 3111259  /usr/lib/libgtk-x11-2.0.so.0.1200.12

The first line is the code segment and the last the data segment. But what’s the strange 0x200000 (2MB) mapping in the middle?

The answer took me a while to figure out.

February 2025

S M T W T F S
      1
2345678
9101112131415
16171819202122
232425262728 

Syndicate

RSS Atom

Most Popular Tags

Expand Cut Tags

No cut tags