Skip to content

Commit

Permalink
Merge branch 'fraccaman/replace-wee-alloc' into draft+3331
Browse files Browse the repository at this point in the history
* fraccaman/replace-wee-alloc:
  wasm_for_tests: delete old unused `wasm_source/Cargo.toml`
  changelog: add #3331
  switch wee_alloc for rlsf
  • Loading branch information
brentstone committed May 30, 2024
2 parents 8b7d5c1 + 8d627ec commit 73e3ab8
Show file tree
Hide file tree
Showing 68 changed files with 297 additions and 280 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/3331-replace-wee-alloc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Switched from wee allocator to rlsf for WASM.
([\#3331](https://github.com/anoma/namada/pull/3331))
88 changes: 32 additions & 56 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions crates/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ pub fn transaction(_attr: TokenStream, input: TokenStream) -> TokenStream {
let ast = parse_macro_input!(input as ItemFn);
let ident = &ast.sig.ident;
let gen = quote! {
// Use `wee_alloc` as the global allocator.
// Use `rlsf` as the global allocator.
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
static ALLOC: rlsf::SmallGlobalTlsf = rlsf::SmallGlobalTlsf::new();

#ast

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

#ast

Expand Down
Loading

0 comments on commit 73e3ab8

Please sign in to comment.