---
title: IONewZero
framework: driverkit
role: symbol
role_heading: Macro
path: driverkit/ionewzero
---

# IONewZero

Allocates memory for an array of the specified type and zero-initializes that memory.

## Declaration

```occ
#define IONewZero(type, count)
```

## Parameters

- `type`: The data type to store in the block of memory. The macro uses the size of this type to determine how much memory to allocate for each array entry.
- `count`: The number of array entries to allocate.

## Return Value

Return Value A pointer to the allocated memory block, or NULL on failure.

## Discussion

Discussion This is a general-purpose utility to allocate memory. There are no alignment guarantees on the returned memory, and alignment may vary depending on the configuration. To allocate memory for use in I/O transfers, create an IOBufferMemoryDescriptor instead.

## See Also

### Allocation

- [IONew](driverkit/ionew.md)
- [IOMalloc](driverkit/iomalloc.md)
- [IOMallocZero](driverkit/iomalloczero.md)
- [OSTypeAlloc](driverkit/ostypealloc.md)
