Closed Bargsteen closed 8 months ago
@Bargsteen I suppose this is just waiting for us to release concordium-std/testing library before it can be merged?
@Bargsteen I suppose this is just waiting for us to release concordium-std/testing library before it can be merged?
Yep :-)
Purpose
This PR implements a new allocator for our smart contracts. It is simple and has a small code size. It uses more memory than a linked-list allocator such as wee_alloc, but for many contracts, this simplicity is sufficient and better.
Something I discovered while building this, is that the Rust compiler sets the initial number of pages in wasm modules to 17, which seems like quite a lot for smart contracts. Each page is 64KiB, so the initial memory is always ~1.1 MiB.
Closes https://github.com/Concordium/concordium-rust-smart-contracts/issues/379
TODO
Changes
bump_alloc
feature toconcordium_std
bump-alloc-tests
wee_alloc
feature (breaking)wee_alloc
to usebump_alloc
concordium-std
library documentation to reflect the new reality1.72
in the testing lib to fix an issue with the indirect dependencyahash
which requires MSRV1.72
.Checklist