You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 25, 2025. It is now read-only.
npm run serve (runs wasm-pack, npm install and webpack dev server)
go to localhost:8080 in browser
click the button (it's the only thing on the page) to increase heap by 131 MB each time
Expected Behavior
Second time allocations are made uses free list.
Actual Behavior
Repeated allocations grow heap infinitely.
Additional Context
This seems similar to an issue mentioned in #105
Heap size does not increase if using default allocator.
Rust source for example is just:
externcrate wee_alloc;// Use `wee_alloc` as the global allocator.#[global_allocator]staticALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;pubfnleak_test(){// This leaks when using wee_alloclet a = Box::new([0;85196]);let b = Box::new([0;80000]);drop(a);drop(b);}fnmain(){loop{leak_test();}}
Describe the Bug
Making two large allocations, then dropping them in the order they were allocated leaks memory in wee_alloc, but not in default allocator.
Steps to Reproduce
Native code
cargo runcargo runWasm
npm run serve(runs wasm-pack, npm install and webpack dev server)Expected Behavior
Second time allocations are made uses free list.
Actual Behavior
Repeated allocations grow heap infinitely.
Additional Context
This seems similar to an issue mentioned in #105
Heap size does not increase if using default allocator.
Rust source for example is just: