---
title: "hv_gic_state_get_size(_:_:)"
framework: Hypervisor
role: symbol
role_heading: Function
platforms: [macOS 15.0+]
path: "hypervisor/hv_gic_state_get_size(_:_:)"
---

# hv_gic_state_get_size(_:_:)

Gets the size of the buffer required for generic interrupt controller (GIC) state.

## Declaration

```swift
func hv_gic_state_get_size(_ state: hv_gic_state_t, _ gic_state_size: UnsafeMutablePointer<Int>) -> hv_return_t
```

## Parameters

- `state`: The GIC state object.
- `gic_state_size`: The pointer to GIC data size, that the framework writes to upon success.

## Return Value

Return Value HV_SUCCESS on success; otherwise, an error code.

## See Also

### Getting and setting the GIC’s state

- [hv_gic_state_create()](hypervisor/hv_gic_state_create().md)
- [hv_gic_set_state(_:_:)](hypervisor/hv_gic_set_state(_:_:).md)
- [hv_gic_state_get_data(_:_:)](hypervisor/hv_gic_state_get_data(_:_:).md)
- [hv_gic_state_t](hypervisor/hv_gic_state_t.md)
- [OS_hv_gic_state](hypervisor/os_hv_gic_state.md)
