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: PowerPC System Software /
Chapter 2 - Mixed Mode Manager / Mixed Mode Manager Reference
Mixed Mode Manager Routines / Creating and Disposing of Routine Descriptors


NewFatRoutineDescriptor

You can call the NewFatRoutineDescriptor function to create a new fat routine descriptor.

pascal UniversalProcPtr NewFatRoutineDescriptor 
                     (ProcPtr theM68kProc, ProcPtr thePowerPCProc, 
                        ProcInfoType theProcInfo);
theM68kProc
The address of a 680x0 routine.
thePowerPCProc
The address of a PowerPC routine.
theProcInfo
The procedure information to be associated with the routine.
DESCRIPTION
The NewFatRoutineDescriptor function creates a new fat routine descriptor and returns a pointer (of type UniversalProcPtr) to it. The routine descriptor contains routine records for both 680x0 and PowerPC versions of a routine. If the value of either the theM68kProc parameter or the thePowerPCProc parameter is NULL, NewFatRoutineDescriptor returns the value NULL.

The memory occupied by the new routine descriptor is allocated in the current heap. If you want the memory to be allocated in some other heap, you'll need to set the current heap to that heap and then restore the original heap before exiting.

SPECIAL CONSIDERATIONS
The NewFatRoutineDescriptor function allocates memory; you should not call it at interrupt time or from any code that might be executed when memory is low. In addition, the block of memory allocated by NewFatRoutineDescriptor is nonrelocatable. To help minimize heap fragmentation, you should try to allocate any routine descriptors you will need early in your application's execution.

When the USESROUTINEDESCRIPTORS compile flag is false, the NewFatRoutineDescriptor function is undefined.

SEE ALSO
See "Using Universal Procedure Pointers" beginning on page 2-21 for a more complete description of when and how to create routine descriptors. See "Specifying Procedure Information" beginning on page 2-14 for information on creating procedure information.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996