battstat as an example: in initialise_global_pixmaps, i call gdk_pixmap_create_from_xpm_d a bunch of times to store every pixmap we’ll ever need inside of the x server (on battery, on ac, charging, etc…). this takes up a bunch of pixmap memory but also means that it’s not taking up process memory. the pixmaps are stored only once even if you have many instances (not too often you have more than one battery status applet, though…).
“not taking up process memory” is a tricky one here, though, since all of the pixmaps are stored in text xpm format which is statically linked into the battstat binary. this xpm text is 8470 bytes plus the overhead of maintaining an array of the lines. over all i imagine about 10k is wasted on data that is used on startup then never again.
on the plus side, it can swap out and never needs to come back.
i’m not going to fix this since the entire way we handle this is planned to change soon (ie: svg instead of xpm). let’s see what memory usage is like then…..