Skip to content

Commit 657a604

Browse files
committed
Merge branch 'fraccaman/replace-wee-alloc' (#3331)
* origin/fraccaman/replace-wee-alloc: wasm_for_tests: delete old unused `wasm_source/Cargo.toml` changelog: add #3331 switch wee_alloc for rlsf
2 parents 787162a + 8d627ec commit 657a604

File tree

67 files changed

+265
-224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+265
-224
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Switched from wee allocator to rlsf for WASM.
2+
([\#3331](https://github.com/anoma/namada/pull/3331))

crates/macros/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ pub fn transaction(_attr: TokenStream, input: TokenStream) -> TokenStream {
2828
let ast = parse_macro_input!(input as ItemFn);
2929
let ident = &ast.sig.ident;
3030
let gen = quote! {
31-
// Use `wee_alloc` as the global allocator.
31+
// Use `rlsf` as the global allocator.
3232
#[global_allocator]
33-
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
33+
static ALLOC: rlsf::SmallGlobalTlsf = rlsf::SmallGlobalTlsf::new();
3434

3535
#ast
3636

@@ -88,9 +88,9 @@ pub fn validity_predicate(
8888
let ast = parse_macro_input!(input as ItemFn);
8989
let ident = &ast.sig.ident;
9090
let gen = quote! {
91-
// Use `wee_alloc` as the global allocator.
91+
// Use `rlsf` as the global allocator.
9292
#[global_allocator]
93-
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
93+
static ALLOC: rlsf::SmallGlobalTlsf = rlsf::SmallGlobalTlsf::new();
9494

9595
#ast
9696

0 commit comments

Comments
 (0)