# std.Progress: move global preallocations to thread memory · gitcafe/zig

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

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

Visibility: public

Requested revision: 7fe72d560d94fc379165ab46c9e568e6e684aa41

Requested commit: 7fe72d560d94fc379165ab46c9e568e6e684aa41

Commit: 7fe72d560d94fc379165ab46c9e568e6e684aa41

Tree: dc18983c81629195bc2cd2fca816dc7dcaa12f33

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.Progress: move global preallocations to thread memory

Instead of making static buffers configurable, let's pick strong
defaults and then use the update thread's stack memory to store the
preallocations. The thread uses a fairly shallow stack so this memory is
otherwise unused. This also makes the data section of the executable
smaller since it runtime allocates the memory when a `std.Progress`
instance is allocated, and in the case that the process is not connected
to a terminal, it never allocates the memory.

```

## Parents

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

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