![]() |
InitZone |
||||
Header: | MacMemory.h | Carbon status: | Unsupported | |
Creates a new heap zone, initializes its header and trailer, and makes it the current zone.
void InitZone ( GrowZoneUPP pgrowZone, SInt16 cmoreMasters, void *limitPtr, void *startPtr );
A pointer to a grow-zone function for the new heap zone. If you do not want the new zone to have a grow-zone function, set this parameter to NULL.
The number of master pointers that should be allocated at a time for the new zone. The Memory Manager allocates this number initially, and, if it needs to allocate more later, allocates them in increments of this same number.
The first byte beyond the end of the zone.
The first byte of the new zone.
If you want to use heap zones other than the original application heap zone, a temporary memory zone, or the system heap zone, you can use the InitZone function to initialize a new heap zone. Although the new zone occupies memory addresses from startPtr through limitPtr1, the new zone includes a zone header and a zone trailer. In addition, the new zone contains a block header for the master pointer block and 4 bytes for each master pointer. If you need to create a zone with some specific number of usable bytes, see Organization of Memory, , for details on the sizes of the zone header, zone trailer, and block header.
Note that the sizes of zones and block headers may change in future system software versions. You should ensure that your zones are large enough to accommodate a reasonable increase in the sizes of those structures.
Call the function MemError to get the result code. See
Because InitZone changes the current zone, you should not call it at interrupt time.
Not supported in Carbon. Not available in Carbon.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)