Important: The information in this document is obsolete and should not be used for new development.
AllowPurgePixels
You can use theAllowPurgePixelsprocedure to make the base address for an offscreen pixel image purgeable.
PROCEDURE AllowPurgePixels (pm: PixMapHandle);
pm- A handle to an offscreen pixel map.
DESCRIPTION
TheAllowPurgePixelsprocedure marks the base address for an offscreen pixel image as purgeable; this allows the Memory Manager to free the memory it occupies if available memory space becomes low. By default,NewGWorldcreates an unpurgeable base address for an offscreen pixel image.To get a handle to an offscreen pixel map, first use the
GetGWorldPixMapfunction, described on page 6-31. Then supply this handle for thepmparameter ofAllowPurgePixels.Your application should call the
LockPixelsfunction (described on page 6-32) before drawing into or copying from an offscreen pixel map. If the Memory Manager has purged the base address for its pixel image,LockPixelsreturnsFALSE. In that case either your application should use theUpdateGWorldfunction (described on page 6-23) to begin reconstructing the offscreen pixel image, or it should draw directly to an onscreen graphics port.Only unlocked memory blocks can be made purgeable. If you use
LockPixels, you must use theUnlockPixelsprocedure (explained in the preceding section) before callingAllowPurgePixels.SPECIAL CONSIDERATIONS
TheAllowPurgePixelsprocedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theAllowPurgePixelsprocedure are
Trap macro Selector _QDExtensions $0004000B SEE ALSO
See Inside Macintosh: Memory for more information about memory management.