Important: The information in this document is obsolete and should not be used for new development.
AllowPurgePixelsYou can use the
AllowPurgePixelsprocedure to make the base address for an offscreen pixel image purgeable.
PROCEDURE AllowPurgePixels (pm: PixMapHandle);
- A handle to an offscreen pixel map.
AllowPurgePixelsprocedure 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 the
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,
FALSE. In that case either your application should use the
UpdateGWorldfunction (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 the
UnlockPixelsprocedure (explained in the preceding section) before calling
AllowPurgePixelsprocedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.
ASSEMBLY-LANGUAGE INFORMATIONThe trap macro and routine selector for the
Trap macro Selector _QDExtensions $0004000B
SEE ALSOSee Inside Macintosh: Memory for more information about memory management.