Re: [Fwd: libpng shared memory patch]
- From: Behdad Esfahbod <behdad cs toronto edu>
- To: Lubos Lunak <l lunak suse cz>
- Cc: performance-list gnome org
- Subject: Re: [Fwd: libpng shared memory patch]
- Date: Sun, 23 Apr 2006 01:29:31 -0400 (EDT)
On Sat, 22 Apr 2006, Lubos Lunak wrote:
> > libpng version 1.2.8rel-5 from dapper
> >
> > before:
> >
> > $ objdump -x /usr/lib/libpng.so | grep data
> > 11 .rodata 00002a00 00021a30 00021a30 00021a30 2**3
> > 18 .data 00000348 00034cd0 00034cd0 00024cd0 2**2
> > 20 .sdata 000000b0 0003502c 0003502c 0002502c 2**2
> >
> > 0x348+0xb0=0x3F8=1016 bytes
> >
> > $ python memstats.py | grep libpng
> > private: /usr/lib/libpng12.so.0.1.2.8: 168 KB (spread among 84 mappings)
>
> This in other words means that every process has two dirty pages because of
> libpng.
How did you get two pages? Each process has two mappings for
libpng12. So with 84 mappings, there are 42 processes, and 168
KB / 42 = 4k = 1 page.
Note that even moving from .data to .rodata is desirable anyway,
even if it doesn't result in reduced memory consumption, it does
result in reduced relocations which is good.
--behdad
http://behdad.org/
"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
-- Dan Bern, "New American Language"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]