# AllocationCapacityOverflow

`import { AllocationCapacityOverflow } from "destack:memory";`

Allocation failed because the requested capacity cannot be represented.

```ds title="AllocationCapacityOverflow"
export struct AllocationCapacityOverflow {
    kind: "capacityOverflow";
    requestedCapacity: usize;
    elementSizeBytes: usize;
    message: string;
}
```

[language/library/src/memory/error.ds:18:30](https://github.com/destack-sh/destack/blob/main/language/library/src/memory/error.ds#L18-L30)

## Members

### `kind: "capacityOverflow"`

Discriminant for allocation failure matching.

### `requestedCapacity: usize`

Requested logical capacity when known.

### `elementSizeBytes: usize`

Element size in bytes when known.

### `message: string`

Human-readable diagnostic detail.
