Mac OS 8.5 Technote: Part XII

Copyright 1998 by Apple Computer, Inc. All Rights Reserved.

[Previous section] [Mac OS 8.5 Contents Page] [Next section]

Inside the System File (Continued)

Code Fragment Manager

The Code Fragment Manager (CFM) is responsible for loading and preparing PowerPC executables. Almost all of the PowerPC Mac OS and all PowerPC applications depend on the services of the CFM in some way.
  • Code Fragment Manager calls to ResolveAliasFile at system startup would attempt to put up the "Please Insert The Disk" alert before any drawing environment was established. CFM now calls ResolveAliasWithMountFlags to disable the disk switch alerts.

  • The Virtual Memory Manager's file mapping code in Mac OS 8.1 makes large chunks of file-mapped memory resident that are certain or very likely to be used in the near future. In Mac OS 8.5, that functionality has been moved into the Code Fragment Manager. Application launch performance should be approximately the same in most cases. However, files that have multiple code fragments (for example, fat CFM 68K/PowerPC applications) may benefit from this refinement.

  • CFM provides an optional facility where an application can specify a special folder to be searched for shared libraries. A field in the 'cfrg' resource provides the resource ID of an 'alis' resource. If this field is non-zero, CFM attempts to read the resource from the application's resource file and resolve it. (The assumption is that this is a relative alias to a subfolder of the application folder -- for example, a repository for plug-ins.) The Code Fragment Manager now calls the new Alias Manager routine ResolveAliasWithMountFlags to resolve aliases referenced by the 'cfrg' resource to prevent any user interaction while libraries are being loaded.

  • The Application Support folder is now part of the CFM search path.

  • CFM defines a new bit in the 'cfrg' resource which forces the fragment's code into the application heap. See the constant kCFragLibUsageMapPrivatelyMask in <CodeFragments.h> for more info. [Radar 2205428]

    Related Materials:

[Previous section] [Mac OS 8.5 Contents Page] [Next section]

To contact us, please use the Contact Us page.