about summary refs log tree commit diff
path: root/src/test/run-pass/allocator-alloc-one.rs
AgeCommit message (Collapse)AuthorLines
2018-12-25Remove licensesMark Rousskov-10/+0
2018-09-21Allow various lints as part of ui-ifying `src/test/run-pass` suite.Felix S. Klock II-0/+2
2018-06-18Rename OOM to allocation errorSimon Sapin-2/+4
The acronym is not descriptive unless one has seen it before. * Rename the `oom` function to `handle_alloc_error`. It was **stabilized in 1.28**, so if we do this at all we need to land it this cycle. * Rename `set_oom_hook` to `set_alloc_error_hook` * Rename `take_oom_hook` to `take_alloc_error_hook` Bikeshed: `alloc` v.s. `allocator`, `error` v.s. `failure`
2018-05-30Pass a `Layout` to `oom`Mike Hommey-2/+2
As discussed in https://github.com/rust-lang/rust/issues/49668#issuecomment-384893456 and subsequent, there are use-cases where the OOM handler needs to know the size of the allocation that failed. The alignment might also be a cause for allocation failure, so providing it as well can be useful.
2018-04-22Replace GlobalAlloc::oom with a lang itemSteven Fackler-4/+2
2018-04-14Replace remaining uses of deprecated Heap with GlobalMike Hommey-4/+4
2018-04-14Replace remaining uses of deprecated std::heap with std::allocMike Hommey-1/+1
2018-04-12Remove the now-unit-struct AllocErr parameter of oom()Simon Sapin-2/+2
2018-01-20Replace Unique<T> with NonZero<T> in Alloc traitSimon Sapin-1/+1
2017-07-05rustc: Implement the #[global_allocator] attributeAlex Crichton-8/+5
This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/197 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
2017-06-25std: Fix implementation of `Alloc::alloc_one`Alex Crichton-0/+27
This had an accidental `u8 as *mut T` where it was intended to have just a normal pointer-to-pointer cast. Closes #42827