# Add builtin for llvm.wasm.memory.size.i32 instrinsic · gitcafe/zig

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

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

Visibility: public

Requested revision: ce3f0077cf3c5ae8edc116177f2f3d33258be9f7

Requested commit: ce3f0077cf3c5ae8edc116177f2f3d33258be9f7

Commit: ce3f0077cf3c5ae8edc116177f2f3d33258be9f7

Tree: a8cc4c5d9721c90b4ccd0304049551952f662dfd

Author: Jakub Konka

Committer: Andrew Kelley

## Message

````
Add builtin for llvm.wasm.memory.size.i32 instrinsic

This will allow the developer to poll the runtime for currently
allocated memory in the number of Wasm pages. Typical usage:

```zig
var wasm_pages = @wasmMemorySize();
@import("std").debug.assert(wasm_pages > 0);
```

````

## Parents

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

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