Commit Graph

14 Commits

Author SHA1 Message Date
Simon Sapin f607a3872a Rename alloc::Void to alloc::Opaque 2018-04-12 22:53:22 +02:00
Simon Sapin ed29777759 Remove conversions for allocated pointers
One was now unused, and `NonNull::new(…).ok_or(AllocErr)` feels short enough
for the few cases that need the other conversion.
2018-04-12 22:53:22 +02:00
Mike Hommey fddf51ee0b Use NonNull<Void> instead of *mut u8 in the Alloc trait
Fixes #49608
2018-04-12 22:53:22 +02:00
Simon Sapin fd242ee64c impl GlobalAlloc for Global 2018-04-12 22:53:22 +02:00
Simon Sapin eae0d46893 Restore Global.oom() functionality
… now that #[global_allocator] does not define a symbol for it
2018-04-12 22:53:21 +02:00
Simon Sapin c957e99b30 realloc with a new size only, not a full new layout.
Changing the alignment with realloc is not supported.
2018-04-12 22:53:13 +02:00
Simon Sapin 157ff8cd05 Remove the now-unit-struct AllocErr parameter of oom() 2018-04-12 22:53:13 +02:00
Simon Sapin 86753ce1cc Use the GlobalAlloc trait for #[global_allocator] 2018-04-12 22:53:12 +02:00
Simon Sapin ba7081a033 Make AllocErr a zero-size unit struct 2018-04-12 22:53:03 +02:00
Simon Sapin 5e5a0c21fc Separate alloc::heap::Alloc trait for stage0 #[global_allocator] 2018-04-12 22:52:54 +02:00
Simon Sapin e521b8b472 Actually deprecate the Heap type 2018-04-12 22:52:47 +02:00
Simon Sapin 88ebd2d752 Rename the Heap type to Global
… since it is the entry point for what’s registered with `#[global_allocator]`
2018-04-12 22:52:47 +02:00
Simon Sapin 743c29bdc5 Actually deprecate heap modules. 2018-04-12 22:52:47 +02:00
Simon Sapin 09e8db1e4f Rename heap modules in the core, alloc, and std crates to alloc 2018-04-12 22:52:47 +02:00