# Revert "Smaller memory footprint for BoundedArray \(\#16299\)" · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/85747b266aac8a2ff7fea4a4b18f722133544ad7)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 85747b266aac8a2ff7fea4a4b18f722133544ad7

Requested commit: 85747b266aac8a2ff7fea4a4b18f722133544ad7

Commit: 85747b266aac8a2ff7fea4a4b18f722133544ad7

Tree: 53759fbc1840205ba142d257cc8640a62357750e

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Revert "Smaller memory footprint for BoundedArray (#16299)"

This reverts commit cb5a6be41ae0efc30d0b59a41b0763db966e5bf4.

I deeply apologize for the churn.

This change is problematic given that we do not have ranged integers
(yet? see #3806).

In the meantime, this type needs to be `usize`, matching the length and
index types for all std lib data structures.

Users who want to save memory should not use heap-allocated BoundedArray
values, since it is inherently memory-inefficient. Use a different
memory layout instead.

If #3806 is accepted and implemented, the length value can become an
integer with the appropriate range, without the footgun. If that
proposal is not accepted, len type will remain a usize.

```

## Parents

- [d9e8671d963dc99ec8b4721f53d77828efa232ed](https://git.cafe/gitcafe/zig/commit/d9e8671d963dc99ec8b4721f53d77828efa232ed?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/85747b266aac8a2ff7fea4a4b18f722133544ad7?format=markdown)
