about summary refs log tree commit diff
path: root/src/liballoc/alloc.rs
AgeCommit message (Collapse)AuthorLines
2020-04-05Stop importing integer modules in liballocLinus Färnstrand-1/+0
2020-03-29Implement `init` and `init_offset` on `AllocInit` and mark it unsafeTim Diekmann-4/+4
2020-03-28Make fields in `MemoryBlock` publicTim Diekmann-17/+18
2020-03-26Remove alignment from `MemoryBlock`Tim Diekmann-31/+31
2020-03-26Fix issues from review and unsoundness of `RawVec::into_box`Tim Diekmann-51/+45
2020-03-26Overhaul of the `AllocRef` trait to match allocator-wg's latest consensTim Diekmann-33/+78
2020-03-08Allow ZSTs in `AllocRef`Tim Diekmann-6/+28
2020-03-03Remove `usable_size` APIsTim Diekmann-7/+7
2020-02-11Preparation for allocator aware `Box`Tim Diekmann-6/+12
2020-01-27Rename `Alloc` to `AllocRef`Tim Diekmann-11/+11
2019-12-22Format the worldMark Rousskov-15/+8
2019-09-25Snap cfgs to new betaMark Rousskov-1/+0
2019-09-20Exempt extern "Rust" from improper_ctypesJosh Stone-1/+1
It should be fine for Rust ABIs to involve any Rust type.
2019-08-02liballoc: Unconfigure tests during normal buildVadim Petrochenkov-33/+3
Remove additional libcore-like restrictions from liballoc, turns out the testing works ok if the tests are a part of liballoc itself.
2019-07-04Switch master to 1.38Mark Rousskov-2/+1
2019-06-08Turn `#[allocator]` into a built-in attribute and rename it to ↵Vadim Petrochenkov-1/+2
`#[rustc_allocator]`
2019-05-04Fix intra-doc link resolution failure on re-exporting libstdTaiki Endo-0/+18
2019-04-18make liballoc internal test suite mostly pass in MiriRalf Jung-0/+1
2019-02-13Clarify guarantees for `Box` allocationJethro Beekman-0/+3
2019-02-03liballoc: revert nested imports style changes.Mazdak Farrokhzad-9/+5
2019-02-02liballoc: apply uniform_paths.Mazdak Farrokhzad-1/+1
2019-02-02liballoc: refactor & fix some imports.Mazdak Farrokhzad-5/+9
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-12global allocators: add a few commentsRalf Jung-0/+4
2018-08-20Replace usages of ptr::offset with ptr::{add,sub}.Corey Farwell-1/+1
2018-08-14Add doc examples for std::alloc::{alloc,alloc_zeroed}.Corey Farwell-0/+31
2018-06-18Rename OOM to allocation errorSimon Sapin-7/+7
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-06-11More alloc docs tweaksSimon Sapin-2/+4
2018-06-11Stabilize alloc::oom (but not set_oom_hook or take_oom_hook)Simon Sapin-1/+1
2018-06-11Stabilize alloc free functions for the global allocators.Simon Sapin-4/+4
2018-06-11Stablize the alloc module without changing stability of its contents.Simon Sapin-6/+5
2018-06-11Document memory allocation APIsSimon Sapin-0/+65
Add some docs where they were missing, attempt to fix them where they were out of date.
2018-06-11Remove the deprecated Heap type/constSimon Sapin-9/+0
2018-06-11Replace `impl GlobalAlloc for Global` with a set of free functionsMike Hommey-23/+25
2018-06-11Remove alloc::Opaque and use *mut u8 as pointer type for GlobalAllocMike Hommey-18/+15
2018-05-30Pass a `Layout` to `oom`Mike Hommey-6/+7
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-05-24std: Ensure OOM is classified as `nounwind`Alex Crichton-0/+1
OOM can't unwind today, and historically it's been optimized as if it can't unwind. This accidentally regressed with recent changes to the OOM handler, so this commit adds in a codegen test to assert that everything gets optimized away after the OOM function is approrpiately classified as nounwind Closes #50925
2018-05-17Auto merge of #50629 - Mark-Simulacrum:stage-step, r=alexcrichtonbors-46/+1
Switch to bootstrapping from 1.27 It's possible the Float trait could be removed from core, but I couldn't tell whether it was intended to be removed or not. @SimonSapin may be able to comment more here; we can presumably also do that in a follow up PR as this one is already quite large.
2018-05-17Switch to 1.26 bootstrap compilerMark Simulacrum-46/+1
2018-05-17Rename trans to codegen everywhere.Irina Popa-1/+1
2018-04-27Auto merge of #50097 - glandium:box_free, r=nikomatsakisbors-3/+11
Partial future-proofing for Box<T, A> In some ways, this is similar to @eddyb's PR #47043 that went stale, but doesn't cover everything. Notably, this still leaves Box internalized as a pointer in places, so practically speaking, only ZSTs can be practically added to the Box type with the changes here (the compiler ICEs otherwise). The Box type is not changed here, that's left for the future because I want to test that further first, but this puts things in place in a way that hopefully will make things easier.
2018-04-25Switch box_free to take the destructured contents of BoxMike Hommey-3/+11
As of now, Box only contains a Unique pointer, so this is the sole argument to box_free. Consequently, we remove the code supporting the previous box_free signature. We however keep the old definition for bootstrapping purpose.
2018-04-22Remove Alloc::oomSteven Fackler-5/+0
2018-04-22Replace GlobalAlloc::oom with a lang itemSteven Fackler-17/+18
2018-04-12Rename alloc::Void to alloc::OpaqueSimon Sapin-13/+13
2018-04-12Remove conversions for allocated pointersSimon Sapin-3/+3
One was now unused, and `NonNull::new(…).ok_or(AllocErr)` feels short enough for the few cases that need the other conversion.
2018-04-12Use NonNull<Void> instead of *mut u8 in the Alloc traitMike Hommey-9/+10
Fixes #49608
2018-04-12impl GlobalAlloc for GlobalSimon Sapin-35/+50
2018-04-12Restore Global.oom() functionalitySimon Sapin-0/+16
… now that #[global_allocator] does not define a symbol for it
2018-04-12realloc with a new size only, not a full new layout.Simon Sapin-13/+9
Changing the alignment with realloc is not supported.