| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2021-09-25 | Use Rvalue::ShallowInitBox for box expression | Gary Guo | -1/+0 | |
| 2021-08-22 | Fix typos “a”→“an” | Frank Steffahn | -1/+1 | |
| 2021-05-05 | alloc: Add unstable Cfg feature `no-global_oom_handling` | John Ericson | -4/+5 | |
| For certain sorts of systems, programming, it's deemed essential that all allocation failures be explicitly handled where they occur. For example, see Linus Torvald's opinion in [1]. Merely not calling global panic handlers, or always `try_reserving` first (for vectors), is not deemed good enough, because the mere presence of the global OOM handlers is burdens static analysis. One option for these projects to use rust would just be to skip `alloc`, rolling their own allocation abstractions. But this would, in my opinion be a real shame. `alloc` has a few `try_*` methods already, and we could easily have more. Features like custom allocator support also demonstrate and existing to support diverse use-cases with the same abstractions. A natural way to add such a feature flag would a Cargo feature, but there are currently uncertainties around how std library crate's Cargo features may or not be stable, so to avoid any risk of stabilizing by mistake we are going with a more low-level "raw cfg" token, which cannot be interacted with via Cargo alone. Note also that since there is no notion of "default cfg tokens" outside of Cargo features, we have to invert the condition from `global_oom_handling` to to `not(no_global_oom_handling)`. This breaks the monotonicity that would be important for a Cargo feature (i.e. turning on more features should never break compatibility), but it doesn't matter for raw cfg tokens which are not intended to be "constraint solved" by Cargo or anything else. To support this use-case we create a new feature, "global-oom-handling", on by default, and put the global OOM handler infra and everything else it that depends on it behind it. By default, nothing is changed, but users concerned about global handling can make sure it is disabled, and be confident that all OOM handling is local and explicit. For this first iteration, non-flat collections are outright disabled. `Vec` and `String` don't yet have `try_*` allocation methods, but are kept anyways since they can be oom-safely created "from parts", and we hope to add those `try_` methods in the future. [1]: https://lore.kernel.org/lkml/CAHk-=wh_sNLoz84AUUzuqXEsYH35u=8HV3vK-jbRbJ_B-JjGrg@mail.gmail.com/ | ||||
| 2021-01-12 | move WriteCloneIntoRaw into alloc::alloc | Josh Stone | -0/+23 | |
| 2020-12-04 | Rename `AllocRef` to `Allocator` and `(de)alloc` to `(de)allocate` | Tim Diekmann | -20/+20 | |
| 2020-11-23 | Auto merge of #79172 - a1phyr:cold_abort, r=Mark-Simulacrum | bors | -0/+1 | |
| Add #[cold] attribute to `std::process::abort` and `alloc::alloc::handle_alloc_error` | ||||
| 2020-11-19 | Bump bootstrap compiler version | Jake Goulding | -17/+2 | |
| 2020-11-18 | Add #[cold] to `abort` and `handle_alloc_error` | Benoît du Garreau | -0/+1 | |
| 2020-11-15 | document that __rust_alloc is also magic to our LLVM fork | Ralf Jung | -0/+2 | |
| 2020-10-25 | Merge remote-tracking branch 'upstream/master' into box-alloc | Tim Diekmann | -1/+1 | |
| 2020-10-24 | Rollup merge of #77610 - hermitcore:dtors, r=m-ou-se | Jonas Schievink | -1/+1 | |
| revise Hermit's mutex interface to support the behaviour of StaticMutex rust-lang/rust#77147 simplifies things by splitting this Mutex type into two types matching the two use cases: StaticMutex and MovableMutex. To support the new behavior of StaticMutex, we move part of the mutex implementation into libstd. The interface to the OS changed. Consequently, I removed a few functions, which aren't longer needed. | ||||
| 2020-10-16 | Merge branch 'master' into box-alloc | Tim Diekmann | -6/+15 | |
| 2020-10-13 | minor changes to pass the format check | Stefan Lankes | -1/+1 | |
| 2020-10-13 | move __rg_oom to the libos to avoid duplicated symbols | Stefan Lankes | -1/+1 | |
| 2020-10-12 | Use intra-doc links for links to module-level docs | Camelid | -3/+3 | |
| 2020-10-09 | rename __default_lib_allocator -> __default_alloc_error_handler | Ralf Jung | -1/+1 | |
| 2020-10-09 | also extend global allocator comment | Ralf Jung | -2/+3 | |
| 2020-10-09 | fix __rust_alloc_error_handler comment | Ralf Jung | -2/+10 | |
| 2020-10-07 | Support custom allocators in `Box` | Tim Diekmann | -4/+15 | |
| Remove `Box::leak_with_alloc` Add leak-test for box with allocator Rename `AllocErr` to `AllocError` in leak-test Add `Box::alloc` and adjust examples to use the new API | ||||
| 2020-10-02 | Implement Make `handle_alloc_error` default to panic (for no_std + liballoc) | Harald Hoyer | -0/+47 | |
| Related: https://github.com/rust-lang/rust/issues/66741 Guarded with `#![feature(default_alloc_error_handler)]` a default `alloc_error_handler` is called, if a custom allocator is used and no other custom `#[alloc_error_handler]` is defined. The panic message does not contain the size anymore, because it would pull in the fmt machinery, which would blow up the code size significantly. | ||||
| 2020-09-28 | Rename AllocErr to AllocError | Jacob Hughes | -10/+10 | |
| 2020-09-22 | a few more &mut self -> self changes | blitzerr | -4/+4 | |
| 2020-09-22 | removing &mut self for other methods of AllocRef | blitzerr | -2/+2 | |
| 2020-09-21 | Changing the alloc() to accept &self instead of &mut self | blitzerr | -2/+2 | |
| 2020-09-08 | Capitalize safety comments | Flying-Toast | -1/+1 | |
| 2020-08-26 | Auto merge of #75687 - TimDiekmann:realloc-align, r=Amanieu | bors | -34/+55 | |
| Allow reallocation to different alignment in `AllocRef` The allocator-wg [has decided](https://github.com/rust-lang/wg-allocators/issues/5#issuecomment-672591112) to support reallocating to a different alignment in `AllocRef`. For more details please see the linked issue. r? @Amanieu closes https://github.com/rust-lang/wg-allocators/issues/5 | ||||
| 2020-08-21 | Use intra-doc-links in `alloc` | LeSeulArtichaut | -18/+0 | |
| 2020-08-19 | Allow reallocation to different alignment | Tim Diekmann | -34/+55 | |
| 2020-08-18 | Make `grow_impl` unsafe | Tim Diekmann | -3/+6 | |
| 2020-08-18 | Clean up AllocRef implementation and documentation | Tim Diekmann | -74/+71 | |
| 2020-08-17 | Fix typo in comment | Tim Diekmann | -2/+2 | |
| 2020-08-17 | Remove fast path in reallocation for same layout sizes | Tim Diekmann | -17/+10 | |
| 2020-08-04 | Replace `Memoryblock` with `NonNull<[u8]>` | Tim Diekmann | -13/+17 | |
| 2020-07-29 | Simplify implementations of `AllocRef` for `Global` and `System` | Tim Diekmann | -71/+70 | |
| 2020-07-28 | Remove in-place allocation and revert to separate methods for zeroed allocations | Tim Diekmann | -43/+69 | |
| Fix docs | ||||
| 2020-07-27 | mv std libs to library/ | mark | -0/+319 | |
