Re: Q: shared libraries
Posted in 1996
In <wrrakr0y56.fsf@tglobe3.tollpost.no> ogj@tglobe3.tollpost.no (M-Xyvind Gjerstad) wrote: : Well, I have read articles claiming that static versions of these programs : in fact tend to reduce overall memory consumption due to shared text. And : because an application only will have the data it is actually _using_ from : its libraries. I get confused. Could you elaborate those article_s_ ? : : Also startup times could well be reduced by using statically linked versions : of programs. I guess this can be implementation dependant. Yes, you are correct. It is well known fact that using shared libraries will not _always_ reduce startup time, page consumption, job of paging etc. as what I have listed in previous post. Especially if the application is pretty small(e.g. less than 200Kb or even 500Kb) even with static linking. In this case, the loading/binding process itself may consum more than save. However, the list is true in real case for real commerical applications which would have large size (executable and process) by linking statically. That is why, linking to dynamic shared libraries is the default link behavior in most modern unix platforms. For instance(by default), with -lc, linker will try libc.so before libc.a. -g