Comments (5)
I switched to dlmalloc, which worked perfectly fine.
from wee_alloc.
I am also experiencing this issue, which is that an OOM error arises in my system when trying to push elements to an alloc::vec::Vec of u32's, right around the 65th element (which is just over 256k bytes of memory). I only have the static_array_backend feature enabled, and the error persists even after adjusting the WEE_ALLOC_STATIC_ARRAY_BACKEND_BYTES env var to twice the default during compilation. For more context wee_alloc is being used as a global allocator in a no_std bare metal OS that is being built. So it is possible there are some confounding variables at play here, but I am fairly certain this is due to wee_alloc.
Are there any fixes or workarounds people have found?
from wee_alloc.
@CryZe, @nand-nor: are y'all using the size classes feature? I'd recommend against using it in super constrained memory situations (eg only 256k of heap space) since it will prefill each size class's free list with 8k from the main free list. It is essentially trading more fragmentation for faster allocation of small objects.
I think using the size classes in a constrained memory environment, combined with the alignment bug that #87 is fixing, could explain this behavior.
If you were using the size classes feature, I'd be interested in if you could re-test with size classes disabled and the fix in #87 and report if you're seeing the same behavior or not.
from wee_alloc.
@fitzgen I have not been using the size classes feature (my target platform has plenty of memory) so the tests I ran separately from tests.sh after enforcing scratch heap alignment did not have this feature enabled.
from wee_alloc.
I also tried both variants (back then) and both were failing to allocate way too early, though with size classes (as seen in the OP), it was even earlier than without.
from wee_alloc.
Related Issues (20)
- Impossibly large allocations fails but still allocates new memory pages
- Cloudflare Worker response bodies being mangled when using wee_alloc HOT 1
- Update outdated usage instruction regarding "extern crate"
- WASM Module HOT 1
- Possible allocator memory corruption? HOT 1
- Unbounded Memory Leak HOT 8
- Is this repo still maintained? HOT 8
- This repo needs to be archived and marked as deprecated HOT 4
- Binary size larger than advertized HOT 4
- free_cell_layout test fails on macOS HOT 1
- CI doesn't check configuration w/o size_classes
- CI should be running tests HOT 6
- Panicky wasm from Vec allocation HOT 2
- Release new version to crates.io HOT 1
- Add git tag for 0.4.3 HOT 1
- Storage at arbitrary address HOT 2
- Allow heap to start not at a page boundary HOT 2
- Shell scripts of repo not working due to wee_alloc compilation errors HOT 5
- Implement more efficient grow/shrink/realloc methods
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wee_alloc.