# std.debug: dumpStackTrace & friends use DirectAllocator · gitcafe/zig

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

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

Visibility: public

Requested revision: caefaf781e22a7b053426621719a6f1d0f69d7cb

Requested commit: caefaf781e22a7b053426621719a6f1d0f69d7cb

Commit: caefaf781e22a7b053426621719a6f1d0f69d7cb

Tree: d77cc3e0e7841a83d6dbfa438a6f256396ff7c39

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.debug: dumpStackTrace & friends use DirectAllocator

this has the downside of failing to print a stack trace
when the system is out of memory (maybe we could add a
FallbackAllocator which tries DirectAllocator and falls
back on the 200KB preallocated buffer).

but for the more common use case when the system is not
out of memory, but the debug info cannot fit in
std.debug.global_allocator, now stack traces will work.

this is the case for the self hosted compiler.

```

## Parents

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

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