ontio/ontology-wasm-cdt-rust

need figure out how to reduce inital memory size

laizy opened this issue · 1 comments

laizy commented

the initial memory allocation of the compiled wasm file was a little large (17*64Kb), and the data section start from 1M, need figure out whether there are some rustc flags to reduce the size or post-processing tool to adjust that value safely.

(memory (;0;) 17)
(data (i32.const 1048576) "total....")
laizy commented

have figured out that the first 1M memory is used for storing stack data. can configured with RUSTFLAGS="-C link-arg=-zstack-size=65536"