Important: The information in this document is obsolete and should not be used for new development.
Chapter 1 - CFM-Based Runtime Architecture
The CFM-based runtime architecture relies on fragments and the Code Fragment Manager (CFM) for its operation. This architecture has been implemented as the default architecture for PowerPC-based Mac OS computers and an optional one, CFM-68K, for 68K-based machines. The key concepts are identical for both implementations, so you should read this chapter if you plan to write either PowerPC or CFM-68K code.In addition, you should read Chapter 2, "Indirect Addressing in the CFM-Based Architecture," which contains more information related to the CFM-based architecture. Chapter 3, "Programming for the CFM-Based Runtime Architecture," contains additional practical information that you may find useful when writing CFM-based programs.
For specific information about the implementation of the CFM-based architecture on the PowerPC and 68K microprocessors, you should read the following chapters:
- Chapter 4, "PowerPC Runtime Conventions," for PowerPC information
- Chapter 9, "CFM-68K Application and Shared Library Structure," and Chapter 5, "CFM-68K Runtime Conventions," for CFM-68K information
Chapter Contents
- Overview
- Closures
- Code and Data Sections
- Reference Counts
- Using Code Fragment Manager Options
- Preparing a Closure
- Searching for Import Libraries
- Checking for Compatible Import Libraries
- The Structure of Fragments
- Fragment Storage
- The Code Fragment Resource
- Extensions to Code Fragment Resource Entries
- Sample Code Fragment Resource Entry Definitions
- A PowerPC Application 'cfrg' 0 Resource Definition
- A CFM-68K Application 'cfrg' 0 Resource Definition
- A Shared Library 'cfrg' 0 Resource Definition
- Special Symbols
- The Main Symbol
- The Initialization Function
- The Termination Routine