---
title: NSZoneMalloc
framework: foundation
role: symbol
role_heading: Function
path: foundation/nszonemalloc
---

# NSZoneMalloc

Allocates memory in a zone.

## Declaration

```occ
extern void *NSZoneMalloc(NSZone *zone, NSUInteger size);
```

## Discussion

Discussion Allocates size bytes in zone and returns a pointer to the allocated memory. This function returns NULL if it was unable to allocate the requested memory.

## See Also

### Managing Zones

- [NSCreateZone](foundation/nscreatezone.md)
- [NSRecycleZone](foundation/nsrecyclezone.md)
- [NSSetZoneName](foundation/nssetzonename.md)
- [NSZoneCalloc](foundation/nszonecalloc.md)
- [NSZoneFree](foundation/nszonefree.md)
- [NSZoneFromPointer](foundation/nszonefrompointer.md)
- [NSZoneName](foundation/nszonename.md)
- [NSZoneRealloc](foundation/nszonerealloc.md)
- [NSDefaultMallocZone](foundation/nsdefaultmalloczone.md)
