# Heap

# Heap

This module includes functions that set the external OpenThread heap.

## Summary

| ### Functions ||
|---|---|
| `https://openthread.io/reference/group/api-heap#group__api-heap_1ga62b868693fd348d31a4ad721834aa0c9(size_t aCount, size_t aSize)` | `void *` |
| `https://openthread.io/reference/group/api-heap#group__api-heap_1ga0e8164697793e2f543f806f7766f587e(void *aPointer)` | `void` |

## Functions

### otHeapCAlloc

```
void * otHeapCAlloc(
  size_t aCount,
  size_t aSize
)
```

> [!NOTE]
> **Note:** This API is deprecated and use of it is discouraged.

<br />

### otHeapFree

```
void otHeapFree(
  void *aPointer
)
```

> [!NOTE]
> **Note:** This API is deprecated and use of it is discouraged.

<br />

## Resources

OpenThread API Reference topics originate from the source code, available
on [GitHub](https://github.com/openthread/openthread/tree/main/include/openthread).
For more information, or to contribute to our documentation, refer to
[Resources](https://openthread.io/resources).