]> git.lizzy.rs Git - rust.git/commitdiff
Stabilize the `System` allocator
authorSimon Sapin <simon.sapin@exyr.org>
Thu, 31 May 2018 17:16:24 +0000 (19:16 +0200)
committerSimon Sapin <simon.sapin@exyr.org>
Mon, 11 Jun 2018 20:48:39 +0000 (13:48 -0700)
src/liballoc_system/lib.rs
src/libstd/alloc.rs

index 85bf43a54297d42b9ff5ecaab352555bf0919c9b..a592868cbefc113797ffcf5bae439221a8bc4e0d 100644 (file)
@@ -45,7 +45,7 @@
 use core::ptr::NonNull;
 
 /// The default memory allocator provided by the operating system.
-#[unstable(feature = "allocator_api", issue = "32838")]
+#[stable(feature = "alloc_system_type", since = "1.28.0")]
 pub struct System;
 
 #[unstable(feature = "allocator_api", issue = "32838")]
@@ -107,7 +107,7 @@ mod platform {
     use System;
     use core::alloc::{GlobalAlloc, Layout};
 
-    #[unstable(feature = "allocator_api", issue = "32838")]
+    #[stable(feature = "alloc_system_type", since = "1.28.0")]
     unsafe impl GlobalAlloc for System {
         #[inline]
         unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
@@ -240,7 +240,7 @@ unsafe fn allocate_with_flags(layout: Layout, flags: DWORD) -> *mut u8 {
         ptr as *mut u8
     }
 
-    #[unstable(feature = "allocator_api", issue = "32838")]
+    #[stable(feature = "alloc_system_type", since = "1.28.0")]
     unsafe impl GlobalAlloc for System {
         #[inline]
         unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
@@ -304,7 +304,7 @@ mod platform {
     // No need for synchronization here as wasm is currently single-threaded
     static mut DLMALLOC: dlmalloc::Dlmalloc = dlmalloc::DLMALLOC_INIT;
 
-    #[unstable(feature = "allocator_api", issue = "32838")]
+    #[stable(feature = "alloc_system_type", since = "1.28.0")]
     unsafe impl GlobalAlloc for System {
         #[inline]
         unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
index fd829bfe753147da9ade0df05c5b53ae44b4f39e..6cae8aaa3db3d3527713a9a40395663edaba0f0c 100644 (file)
@@ -20,7 +20,7 @@
 #[doc(inline)]
 pub use alloc_crate::alloc::*;
 
-#[unstable(feature = "allocator_api", issue = "32838")]
+#[stable(feature = "alloc_system_type", since = "1.28.0")]
 #[doc(inline)]
 pub use alloc_system::System;