about summary refs log tree commit diff
path: root/src/liballoc/alloc.rs
AgeCommit message (Collapse)AuthorLines
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.
2018-04-12Remove the now-unit-struct AllocErr parameter of oom()Simon Sapin-3/+3
2018-04-12Use the GlobalAlloc trait for #[global_allocator]Simon Sapin-148/+40
2018-04-12Make AllocErr a zero-size unit structSimon Sapin-16/+16
2018-04-12Separate alloc::heap::Alloc trait for stage0 #[global_allocator]Simon Sapin-5/+0
2018-04-12Actually deprecate the Heap typeSimon Sapin-2/+6
2018-04-12Rename the Heap type to GlobalSimon Sapin-9/+14
… since it is the entry point for what’s registered with `#[global_allocator]`
2018-04-12Actually deprecate heap modules.Simon Sapin-1/+1
2018-04-12Rename `heap` modules in the core, alloc, and std crates to `alloc`Simon Sapin-0/+291