DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Shared libraries

Increase space usage in memory

A target library might add space to a process. A shared library's target file may have both text and data regions connected to a process. The text region is shared by all processes that use the library, the data region is not. Every process that uses the library gets its own private copy of the entire library data region. This adds to the process's memory requirements. As a result, if an application uses only a small part of a shared library's text and data, executing the application might require more memory with a shared library than without one. For example, using the shared C library to access only strcmp(S) saves disk storage and memory. However, the memory cost for sharing all the shared C library's private data region outweighs the savings. The non-shared version of the library would be more appropriate.


Next topic: Coding an application
Previous topic: Processes using an archive and a shared library

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003