---
title: NSZoneCalloc
framework: foundation
role: symbol
role_heading: Function
path: foundation/nszonecalloc
---

# NSZoneCalloc

Allocates memory in a zone.

## Declaration

```occ
extern void *NSZoneCalloc(NSZone *zone, NSUInteger numElems, NSUInteger byteSize);
```

## Discussion

Discussion Allocates enough memory from zone for numElems elements, each with a size numBytes bytes, and returns a pointer to the allocated memory. The memory is initialized with zeros. 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)
- [NSZoneFree](foundation/nszonefree.md)
- [NSZoneFromPointer](foundation/nszonefrompointer.md)
- [NSZoneMalloc](foundation/nszonemalloc.md)
- [NSZoneName](foundation/nszonename.md)
- [NSZoneRealloc](foundation/nszonerealloc.md)
- [NSDefaultMallocZone](foundation/nsdefaultmalloczone.md)
