Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Mac OS Runtime Architectures /
Chapter 1 - CFM-Based Runtime Architecture / Closures


Code and Data Sections

Each connection has sections associated with it that contain either code or data as shown in Figure 1-3.

Figure 1-3 Sections associated with a connection

Within a process, a connection is generally shared between multiple closures, and therefore both code and data sections are shared. Fragments that are used in multiple processes share their code, but they have the following choices for sharing their data:

In Figure 1-4, fragment cowLib is globally shared while fragment dogLib is shared per-process.

Figure 1-4 Fragments shared between processes

In most cases, per-process sharing is preferred over systemwide sharing. For more information about systemwide sharing, see "Systemwide Sharing and Data-Only Fragments," beginning on page 3-24.

Each library determines how its global data is to be shared, and this information is stored in the library at link time. The library developer can indicate either systemwide or per-process data instantiation for each separate data section in a library.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 MARCH 1997