# DEQUE_MAX_CAPACITY

> `const` **DEQUE_MAX_CAPACITY**: `number`

Defined in: [packages/deque/src/deque.ts:144](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/deque/src/deque.ts#L144)

The most elements a deque can hold: `2 ** 30`. Storage is a power-of-two ring, and this bound keeps every wrapped index a non-negative 32-bit integer.

It is an upper bound, not a promise: a runtime may refuse to allocate storage this large, as Bun does for a `Float64Array` of `2 ** 30` elements, and a push then throws `MAX_CAPACITY_EXCEEDED`. `arrayDeque` stops at `2 ** 25` elements for the same reason.
