gyscos / zstd-rs

A rust binding for the zstd compression library.
MIT License
527 stars 112 forks source link

fix wasm_shim allocation behavior as per #248 #249

Closed SFBdragon closed 1 year ago

gyscos commented 1 year ago

Sounds good, although this prompted me to check the c docs: turns out calloc expects its memory to be zeroed.

Woops indeed! Guess on wasm there's no special CoW zero page we could use, so let's just zero things out manually here?

SFBdragon commented 1 year ago

I hope you can squash my messy commit history :)

(Everything is still using std for now)