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 3 - Programming for the CFM-Based Runtime Architecture


Requirements for Executing CFM-68K Runtime Programs

To run CFM-68K runtime programs, target computers must have the following configuration:

If the Code Fragment Manager is not present when an attempt to launch a CFM-68K application is made, a message indicates that the CFM-68K Runtime Enabler is needed.

If you want to check on the availability of the Code Fragment Manager from classic 68K code, you can call the Gestalt function with the selector gestaltCFMAttr in a routine similar to the following:

Boolean HaveCFM()
{
   long response;
   return ( (Gestalt(gestaltCFMAttr, &response) == noErr) &&
            (((response >> gestaltCFMPresent) & 1) != 0));
}
For more information about Gestalt and the Gestalt Manager, see Inside Macintosh: Operating System Utilities.

CFM-68K programs run transparently side by side with classic 68K applications. The Process Manager reads the 'cfrg'0 resource at application launch time. The 'cfrg'0 resource tells the Process Manager whether the application contains CFM-68K runtime code and, if so, where that code is located. If the Process Manager cannot find a 'cfrg'0 resource, it assumes that the application is a classic 68K application, where the executable code is contained within 'CODE' resources in the application's resource fork. For more details of the CFM-68K application launch process, see Chapter 9, "CFM-68K Application and Shared Library Structure."

If the target 68K computer does not support file-mapping, it must have enough RAM installed to load all the shared libraries required by the CFM-68K program. At least 8 MB of RAM is suggested for target computers.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 MARCH 1997