Repository navigation
alloc wanted features & bugfixes #408
Copy link
Copy link
Open
Labels
metaMeta issue.Meta issue.• toolchainRelated to `rustc`, `bindgen`, `rustdoc`, LLVM, Clippy...Related to `rustc`, `bindgen`, `rustdoc`, LLVM, Clippy...
Description
Note: there is the "A-rust-for-linux" label in the rust repository: https://github.com/rust-lang/rust/labels/A-rust-for-linux.
Note: In Linux v6.13, Linux started using its own alloc module instead of the Rust standard library alloc crate.
Note: In Linux v6.10, Linux removed its custom fork of the Rust standard library alloc crate.
Features that we would like to see
Required (we almost certainly want them)
Nice to have (not critical, we could workaround if needed, etc.)
Low priority (we will likely not use them in the end)
Done (stabilized, fixed, not needed anymore, etc.)
-
Disabling infallible allocations.
-
Arc::try_pin. -
try_*methods foralloc, usable underno_global_oom_handling.- We currently extend
BoxandVecvia extensions traits and adestructure/rebuildpair of functions, so that we avoid having a customallocfork like in the past (Customalloc, using stable Rust compilers, and more #402). - Issue: Tracking issue for
try_reserve: RFC 2116 fallible collection allocation rust-lang/rust#48043. - Issue in wg-allocators: try_* methods for containers rust-lang/wg-allocators#39.
- Issue in wg-allocators: Allocator API taking context rust-lang/wg-allocators#138.
- PR: alloc: add some try_* methods Rust-for-Linux needs rust-lang/rust#86938.
- Issue: Tracking Issue for
more_fallible_allocation_methodsrust-lang/rust#86942. - Issue: Consider adding
Vec::try_with_capacity(_in)and friends rust-lang/rust#91913. - PR: vec: add try_* methods and a try_vec! macro to make Vec usable in without infallible allocation methods rust-lang/rust#95051.
- PR:
alloc: makevec!unavailable underno_global_oom_handlingrust-lang/rust#96089. - Experiment PR: fallible allocator experiment rust-lang/rust#111970.
- Zulip: https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/Allocator.20API.20for.20fallible.20alloc.20actions/near/359086699.
- Zulip: https://rust-lang.zulipchat.com/#narrow/stream/197181-t-libs.2Fwg-allocators/topic/Split.20or.20merge.20std.2Falloc.2Fcore.3F/near/359717930.
- Zulip: https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/no_global_oom_handling.20removal/near/498600545.
- We currently extend
-
Disabling
rcandsync. -
Ensure
no_global_oom_handlingbuilds are warning-free.- Currently we have the in-tree fork, but if in the future we want to use the upstream one, it would be best to have warning-free builds like our fork (for which we use
-Dwarnings). - PR:
alloc: clean and ensureno_global_oom_handlingbuilds are warning-free rust-lang/rust#98652.
- Currently we have the in-tree fork, but if in the future we want to use the upstream one, it would be best to have warning-free builds like our fork (for which we use
Bugs that we would like to see fixed
Required (we almost certainly want them)
Nice to have (probably not critical, we could workaround if needed, etc.)
Low priority (we will likely not use them in the end)
Done (stabilized, fixed, or not needed anymore, etc.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
metaMeta issue.Meta issue.• toolchainRelated to `rustc`, `bindgen`, `rustdoc`, LLVM, Clippy...Related to `rustc`, `bindgen`, `rustdoc`, LLVM, Clippy...
Activity
Ericson2314 commentedon Jul 3, 2021
Should we try to turn 487d757 into a PR for rust next?
alex commentedon Jul 3, 2021
ojeda commentedon Jul 3, 2021
Yeah, I think many of the new methods can likely be taken without much fuss to upstream -- I started with the easy bits first.
I am not 100% sure about whether upstream would want to use
TryReserveErrorin all the places I used it, though.alex commentedon Jul 15, 2021
Arc::try_pin is now merged
wedsonaf commentedon Jul 15, 2021
Alex, we are actually deprecating
Arcin favor ofRef(see #377). The only place still using it is binder; I have a long series that removes it but it still needs some cleanup before being ready for review (which is taking longer because I'm working on a hw driver now).alex commentedon Jul 15, 2021
rust: import upstream `alloc` crate
rust: import upstream `alloc` crate
rust: import upstream `alloc` crate
rust: import upstream `alloc` crate
rust: import upstream `alloc` crate
rust: import upstream `alloc` crate
rust: import upstream `alloc` crate