---
title: NSZoneFromPointer
framework: foundation
role: symbol
role_heading: Function
path: foundation/nszonefrompointer
---

# NSZoneFromPointer

Gets the zone for a given block of memory.

## Declaration

```occ
extern NSZone *NSZoneFromPointer(void *ptr);
```

## Return Value

Return Value The zone for the block of memory indicated by pointer, or NULL if the block was not allocated from a zone.

## Discussion

Discussion pointer must be one that was returned by a prior call to an allocation function.

## See Also

### Managing Zones

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