Comments (3)
This seems reasonable to me. Would you like to make a pull request?
from bumpalo.
I'm not familiar with the codebase and reasoning for things enough to be confident I could write a safe implementation in the time I have. However, if you would be willing outline what it would take to make a safe implementation of such a function, I can give it a shot.
from bumpalo.
The dealloc_chunk_list
helper function shows how you can iterate over each chunk. Implementing this new method should be basically the same as that, but instead of deallocating each chunk, summing each chunk's size (example of getting a chunk's size here, this could be factored out to a helper method on ChunkFooter
).
Is that enough to get you started? Anything I can clear up?
from bumpalo.
Related Issues (20)
- Miri Stacked Borrows violation after replacing `std::boxed::Box` with `bumpalo::boxed::Box`
- When can we expect a new release? HOT 1
- feat: expose constant ABOUT_ONE_PAGE or similar HOT 6
- MSRV build is broken HOT 2
- May panic due to unwrap on Err HOT 2
- Missing Clone for Box HOT 2
- Add rust-version to Cargo.toml HOT 1
- Request to yank bumpalo v3.12.1 HOT 1
- Implement `std::io::Write` for `Vec<'bump, u8>` HOT 1
- Add a `bumpalo::collections::ThinSlice` type HOT 1
- Memory leak may happen after calling `Bump::dealloc`. HOT 2
- `Box::pin_in` violates pin's drop guarantee HOT 1
- `allocator_api` tests failing HOT 2
- Remove a branch from `try_alloc_layout`? HOT 3
- Improve performance of `extend_from_slice` where `T: Copy` HOT 4
- Ability to create Bump from pre-existing memory allocation? HOT 9
- MSRV disagrees between Cargo.toml and CHANGELOG.md HOT 2
- Minimum alignment HOT 3
- Analysis of Bump Allocator Performance HOT 1
- `Bump` not respecting allocation limit set HOT 4
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 bumpalo.