> Assuming statically linked-in libraries are properly aligned,
> we'll have lots of equal pages in the system, so the kernel could
> find and automatically map them together.

This is not true.  When static libraries are linked into
a target binary, only the necessary objects are taken,
and all the symbol references are resolved (avoiding
the need for relocation at load time), and the code is
not position-independent.  So even if they were "properly
aligned", the bits of common code would be very small.

You'll see this if you run an experiment and compare
two big binaries for common code sequences.  They'll
be there, but nothing nearly as big as a page.

Russ

Reply via email to