Memory Management Functions

Perform low-level memory management tasks.

Topics

Core Foundation ARC Integration

CFBridgingRetain

Casts an Objective-C pointer to a Core Foundation pointer and also transfers ownership to the caller.

CFBridgingRelease

Moves a non-Objective-C pointer to Objective-C and also transfers ownership to ARC.

Memory Management

NSAllocateMemoryPages

Allocates a new block of memory.

NSCopyMemoryPages

Copies a block of memory.

NSDeallocateMemoryPages

Deallocates the specified block of memory.

NSLogPageSize

Returns the binary log of the page size.

NSPageSize

Returns the number of bytes in a page.

NSRealMemoryAvailable

Returns information about the user’s system.

Deprecated
NSRoundDownToMultipleOfPageSize

Returns the specified number of bytes rounded down to a multiple of the page size.

NSRoundUpToMultipleOfPageSize

Returns the specified number of bytes rounded up to a multiple of the page size.

See Also

Memory Management

NSAutoreleasePool

An object that supports Cocoa’s reference-counted memory management system.