# wasm: support \`memset\` for elem abi size \> 1 · gitcafe/zig

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

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

Visibility: public

Requested revision: 4a33aa922e90b76248b259a89be86966eb4898c2

Requested commit: 4a33aa922e90b76248b259a89be86966eb4898c2

Commit: 4a33aa922e90b76248b259a89be86966eb4898c2

Tree: 9e0320d8d8cc8e4d63fc341b6f1db591a7d632c0

Author: Luuk de Gram

Committer: Luuk de Gram

## Message

```
wasm: support `memset` for elem abi size > 1

Previously we incorrectly assumed all memset's to have its element
abi-size be 1 byte. This would set the region of memory incorrectly.
We now have a more efficient loop, as well as support any element
type by re-using the `store` function for each element and moving
the pointer by 1 element.

```

## Parents

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

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