TITLE
    Apple Shared Library Manager and Shared Libraries (7/95)
Article ID:
Created:
Modified:
17365
3/15/95
7/6/95

TOPIC



    This article describes the Apple Shared Library Manager (ASLM) and shared libraries.


DISCUSSION


    Apple Shared Library Manager is a piece of code that lets other programs share common code. Historically each application was required to link in any necessary library modules at compile time. The shared library manager lets any common code be loaded into memory only once by all running applications and then shared by others who also need to make the same calls thus reducing the memory foot print for application.

    ASLM ships with several Apple as well as some third-party products. Any application that requires ASLM ships with a copy of the application. ASLM maintains the relationship of applications to shared libraries at the system level.

    Shared Libraries
    ----------------
    A shared library is a library of functions or classes (for C++ programmers) that are compiled, linked, and stored separately from the clients (applications) that use them. By accessing the functions or classes that are stored in a shared library, a client (application) can call functions that are not part of its executable code. Furthermore, functions or classes that are stored in a shared library can be called by different applications that are running at the same time.

    Because shared libraries can contain shared code and are loaded and linked at run time, they save enormous amounts of RAM and disk space. Shared libraries eliminate the necessity for keeping multiple copies of code in memory when multiple applications use the same code. Shared libraries help software developers design independent, modular, compact libraries that applications can share. It also helps software designers develop their products faster, and it makes the products easier to improve and maintain.

    A shared library file is a binary file that can contain object code for functions, classes, methods (member functions), data, and resources. A shared library file can contain one or more shared libraries. When a shared library file is made available, developers can share, and dynamically link with, the code stored in the shared library.

    Clients
    -------
    A client is any application or library that creates objects or uses methods or functions that are implemented in shared libraries. Clients can include applications, system extensions, INITs, CDEVs, XFCNs, and XCMDs, other kinds of stand-alone code resources, and even shared libraries themselves, because shared libraries typically use other shared libraries.

    A client written in a non-object-oriented language, such as C or Pascal, can call routines that are stored in a shared library in the same way that it would call any other function. A C++ client can instantiate objects from classes that are stored in the shared library in the same way that it would instantiate objects from any class.


    This article was published in the "Information Alley":
    Volume II, Issue 2, Page 4


    Article Change History:
    06 Jul 1995 - Corrected minor typos.
    18 May 1995 - Updated to reflect Info Alley information. Other minor changes.
    05 May 1995 - Changed title and added more information on ASLM.

    Support Information Services

Document Information
Product Area: Apple Software
Category: Software Information & Resources
Sub Category: General Topics

Copyright © 2000 Apple Computer, Inc. All rights reserved.