Skip to content

Commit

Permalink
Stabilize alloc free functions for the global allocators.
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin committed Jun 11, 2018
1 parent bbaff03 commit 45d6d20
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/liballoc/alloc.rs
Expand Up @@ -56,7 +56,7 @@ pub struct Global;
/// # Safety
///
/// See [`GlobalAlloc::alloc`].
#[unstable(feature = "allocator_api", issue = "32838")]
#[stable(feature = "global_alloc", since = "1.28.0")]
#[inline]
pub unsafe fn alloc(layout: Layout) -> *mut u8 {
__rust_alloc(layout.size(), layout.align())
Expand All @@ -74,7 +74,7 @@ pub unsafe fn alloc(layout: Layout) -> *mut u8 {
/// # Safety
///
/// See [`GlobalAlloc::dealloc`].
#[unstable(feature = "allocator_api", issue = "32838")]
#[stable(feature = "global_alloc", since = "1.28.0")]
#[inline]
pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) {
__rust_dealloc(ptr, layout.size(), layout.align())
Expand All @@ -92,7 +92,7 @@ pub unsafe fn dealloc(ptr: *mut u8, layout: Layout) {
/// # Safety
///
/// See [`GlobalAlloc::realloc`].
#[unstable(feature = "allocator_api", issue = "32838")]
#[stable(feature = "global_alloc", since = "1.28.0")]
#[inline]
pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8 {
__rust_realloc(ptr, layout.size(), layout.align(), new_size)
Expand All @@ -110,7 +110,7 @@ pub unsafe fn realloc(ptr: *mut u8, layout: Layout, new_size: usize) -> *mut u8
/// # Safety
///
/// See [`GlobalAlloc::alloc_zeroed`].
#[unstable(feature = "allocator_api", issue = "32838")]
#[stable(feature = "global_alloc", since = "1.28.0")]
#[inline]
pub unsafe fn alloc_zeroed(layout: Layout) -> *mut u8 {
__rust_alloc_zeroed(layout.size(), layout.align())
Expand Down

0 comments on commit 45d6d20

Please sign in to comment.