# DeviceMemory

`import { DeviceMemory } from "destack:compute";`

Compute device memory snapshot.

```ds title="DeviceMemory"
export struct DeviceMemory {
    total: usize;
    available: usize;
    unified: boolean;
}
```

[language/library/src/compute/device.ds:19:28](https://github.com/destack-sh/destack/blob/main/language/library/src/compute/device.ds#L19-L28)

## Members

### `total: usize`

Total memory in bytes when the backend exposes it.

### `available: usize`

Available memory in bytes when the backend exposes it.

### `unified: boolean`

Whether host and device memory are physically unified.
