![]() |
ATSUCreateMemorySetting |
||||
Header: | ATSUnicode.h | Carbon status: | Unsupported | |
Creates a memory setting.
OSStatus ATSUCreateMemorySetting ( ATSUHeapSpec iHeapSpec, ATSUMemoryCallbacks *iMemoryCallbacks, ATSUMemorySetting *oMemorySetting );
A value that indicates whether ATSUI or your application will control memory allocation operations. See
A pointer to a memory callback union that contains either pointers to your memory allocation callback functions or the heap that you want ATSUI to use when allocating memory.
On return, a pointer to a reference to a new memory allocation setting. To make this setting current, you must pass it to the function ATSUSetCurrentMemorySetting. You cannot pass NULL for this parameter.
A result code.
The ATSUCreateMemorySetting function enables you to specify whether you wish to perform memory allocations yourself or have ATSUI do so. If you want to control memory allocation in ATSUI, pass kATSUUseCallbacks in the iHeapSpec parameter and a pointer to a ATSUMemoryCallbacks union that contains pointers to your callback functions in the iMemoryCallbacks parameter.
After creating a memory setting, you must pass it to the function ATSUSetCurrentMemorySetting to ensure that it will be used in subsequent Memory Manager calls.
You might want to create different memory settings for different memory allocation operations. For example, you might create two different settings designating different heaps to use for allocating the memory associated with style and text layout object creation. Before creating a style or text layout object, you would then make the appropriate setting current by calling ATSUSetCurrentMemorySetting.
Available beginning with ATSUI 1.1.
Not supported in Carbon. Not available in Carbon.
Control of memory allocation not available in CarbonLib and not necessary on Mac OS X.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)