Quoting bulia byak <buliabyak@...400...>:
On Mon, 07 Mar 2005 13:42:58 +1100, Peter Moulder <Peter.Moulder@...38...> wrote:
Disadvantages:
- Makes Inkscape source tree about 1MB bigger, and increases Inkscape's memory usage at runtime.
Why is memory usage increased, compared to loading a lib?
It doesn't increase the memory usage so much as reduce the number of pages that can be shared between processes.
With static linking, every executable has its own copy of the library in memory as it runs (though multiple instances of the same executable share among themselves).
With dynamic linking, the library is not only shared on disk, but shared in memory too -- e.g. if three different executables are running that all link against the same version of libfoo, there will still only be one copy in memory that all three share.
Note that the sharing only applies to code, not data, and that code is demand-loaded, so you mostly only pay for the parts of the library you use.
-mental