O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Zones

These functions are used to manipulate memory zones, represented by the data type NSZone.

NSAllocateMemoryPages

void *NSAllocateMemoryPages(unsigned bytes)

NSCopyMemoryPages

void NSCopyMemoryPages(const void *source, void *dest, unsigned bytes)

NSCreateZone

NSZone *NSCreateZone(unsigned startSize, unsigned granularity, BOOL canFree)

NSDeallocateMemoryPages

void NSDeallocateMemoryPages(void *ptr, unsigned bytes)

NSDefaultMallocZone

NSZone *NSDefaultMallocZone(void)

NSLogPageSize

unsigned NSLogPageSize(void)

NSPageSize

unsigned NSPageSize(void)

NSRealMemoryAvailable

unsigned NSRealMemoryAvailable(void)

NSRecycleZone

void NSRecycleZone(NSZone *zone)

NSReturnAddress

void *NSReturnAddress(unsigned frame)

NSRoundDownToMultipleOfPageSize

unsigned NSRoundDownToMultipleOfPageSize(unsigned bytes)

NSRoundUpToMultipleOfPageSize

unsigned NSRoundUpToMultipleOfPageSize(unsigned bytes)

NSSetZoneName

void NSSetZoneName(NSZone *zone, NSString *name)

NSZoneCalloc

void *NSZoneCalloc(NSZone *zone, unsigned numElems, unsigned byteSize)

NSZoneFree

void NSZoneFree(NSZone *zone, void *ptr)

NSZoneFromPointer

NSZone *NSZoneFromPointer(void *ptr)

NSZoneMalloc

void *NSZoneMalloc(NSZone *zone, unsigned size)

NSZoneName

NSString *NSZoneName(NSZone *zone)

NSZoneRealloc

void *NSZoneRealloc(NSZone *zone, void *ptr, unsigned size)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required