tinygo-org / tinygo

Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
https://tinygo.org
Other
15.25k stars 900 forks source link

memory overflow #4221

Open Taoja opened 5 months ago

Taoja commented 5 months ago

tinygo version 0.30.0 go version 1.21.6

I tried using wasm to intercept the request and response then encrypt and decrypt them。

for the same source code, HeapInuse always increases when compiled using tinygo, but does not when compiled using go.

the first picture is tinygo test, it show HeapInuse increase to 29046KB after i do request 90 times. tinygo

the second picture is go test, it show HeapInuse just used 4016KB after i do request 90 times. go

orsinium commented 5 months ago

Which GC do you use? Try specifying -gc=conservative

Taoja commented 5 months ago

Which GC do you use? Try specifying -gc=conservative

i tryed all the gc options. -gc=conservative is same like default

Taoja commented 5 months ago

i tryed tinygo0.25.0 just now, the memory overflow higher then 0.30.0