> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ApuHeapState

> ApuHeapState

# ApuHeapState

The heap state of the APU.

## Syntax

```cpp theme={null}
typedef struct ApuHeapState {  
    UINT32 bytesFree;  
    UINT32 bytesAllocated;  
    UINT32 bytesLost;  
    UINT32 maximumBlockSizeAvailable;  
    UINT32 allocationCount;  
} ApuHeapState  
```

### Members

*bytesFree*\
Type: UINT32

Size of all unallocated regions.

*bytesAllocated*\
Type: UINT32

Size of all allocated regions as visible to the title.

*bytesLost*\
Type: UINT32

Size of all memory lost to alignment requests and fragmented blocks too small to allocate.

*maximumBlockSizeAvailable*\
Type: UINT32

Largest block available. Actual space available can be less due to alignment requirements.

*allocationCount*\
Type: UINT32

Count of all allocated blocks.

## Remarks

This structure is output by [ApuHeapGetState](/reference/audio/apu/functions/apuheapgetstate).

An APU heap is created by [ApuCreateHeap](/reference/audio/apu/functions/apucreateheap). The heap persists for the lifetime of the process.

## Requirements

**Header:** apu.h

**Supported platforms:** XBOX One family consoles and XBOX Series consoles

## See also

[ApuHeapGetState](/reference/audio/apu/functions/apuheapgetstate)\
[APU](/reference/audio/apu/apu_members)


## Related topics

- [ApuHeapGetState](/reference/audio/apu/functions/apuheapgetstate.md)
- [APU (Audio Processing Unit)](/reference/audio/apu/apu_members.md)
- [ApuCreateHeap](/reference/audio/apu/functions/apucreateheap.md)
- [XApuStateOptions](/reference/audio/xapu/enums/xapustateoptions.md)
- [XApuProcessType](/reference/audio/xapu/enums/xapuprocesstype.md)
