# std.heap.GeneralPurposeAllocator: runtime-known page size · gitcafe/zig

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

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

Visibility: public

Requested revision: dd2fa4f75d3d2b1214fde22081f0b88850d1b55d

Requested commit: dd2fa4f75d3d2b1214fde22081f0b88850d1b55d

Commit: dd2fa4f75d3d2b1214fde22081f0b88850d1b55d

Tree: 272d7d23a6f4bd7627adbbdc6145b3cb8010c89d

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.heap.GeneralPurposeAllocator: runtime-known page size

no longer causes compilation failure.

This also addresses the problem of high map count causing OOM by
choosing a page size of 2MiB for most targets when the page_size_max is
smaller than this number.

```

## Parents

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

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