Comments (2)
I'd be happy to implement this! To clarify, is the idea to have the return type for those two functions use
&[MaybeUninit<u8>]
instead ofNonNull<u8>
?That makes more sense to me than
MaybeUninit<&[u8]>
because the slice's metadata is initialized (e.g. its length is available withoutunsafe
), it's just the bytes that aren't.
That is correct.
However I don't think we actually want to implement this until we're ready for a breaking change to bumpalo
, which probably won't be until std
supports custom allocators or some other really well motivated reason.
We would also want to double check that this change doesn't regress the performance of allocation, since all the allocation APIs are built on top of these methods.
from bumpalo.
I'd be happy to implement this! To clarify, is the idea to have the return type for those two functions use &[MaybeUninit<u8>]
instead of NonNull<u8>
?
That makes more sense to me than MaybeUninit<&[u8]>
because the slice's metadata is initialized (e.g. its length is available without unsafe
), it's just the bytes that aren't.
from bumpalo.
Related Issues (20)
- 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 3
- `Bump` not respecting allocation limit set HOT 4
- Execution of test cases at a particular compilation optimization level appears to be stack overflow
- Miri error with `allocator_api` and `Box`-pointer roundtrips
- Please consider relaxing the MSRV of this crate HOT 1
- `alloc` should require `T: !Drop` or be `unsafe` HOT 6
- Appending to bumpalo::collections::Vec<'a, T> from regular Vec the most optimized way HOT 2
- Potential Security Vulnerabilities in the Crate: Use After Free and Heap Buffer Overflow HOT 1
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.