Skip to content

Commit 39a6876

Browse files
committed
Stabilize the System allocator
1 parent 5f00d65 commit 39a6876

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/liballoc_system/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ use core::alloc::{Alloc, GlobalAlloc, AllocErr, Layout};
4545
use core::ptr::NonNull;
4646

4747
/// The default memory allocator provided by the operating system.
48-
#[unstable(feature = "allocator_api", issue = "32838")]
48+
#[stable(feature = "alloc_system_type", since = "1.28.0")]
4949
pub struct System;
5050

5151
#[unstable(feature = "allocator_api", issue = "32838")]
@@ -107,7 +107,7 @@ mod platform {
107107
use System;
108108
use core::alloc::{GlobalAlloc, Layout};
109109

110-
#[unstable(feature = "allocator_api", issue = "32838")]
110+
#[stable(feature = "alloc_system_type", since = "1.28.0")]
111111
unsafe impl GlobalAlloc for System {
112112
#[inline]
113113
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
@@ -240,7 +240,7 @@ mod platform {
240240
ptr as *mut u8
241241
}
242242

243-
#[unstable(feature = "allocator_api", issue = "32838")]
243+
#[stable(feature = "alloc_system_type", since = "1.28.0")]
244244
unsafe impl GlobalAlloc for System {
245245
#[inline]
246246
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
@@ -304,7 +304,7 @@ mod platform {
304304
// No need for synchronization here as wasm is currently single-threaded
305305
static mut DLMALLOC: dlmalloc::Dlmalloc = dlmalloc::DLMALLOC_INIT;
306306

307-
#[unstable(feature = "allocator_api", issue = "32838")]
307+
#[stable(feature = "alloc_system_type", since = "1.28.0")]
308308
unsafe impl GlobalAlloc for System {
309309
#[inline]
310310
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {

src/libstd/alloc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use core::{mem, ptr};
1919
#[doc(inline)]
2020
pub use alloc_crate::alloc::*;
2121

22-
#[unstable(feature = "allocator_api", issue = "32838")]
22+
#[stable(feature = "alloc_system_type", since = "1.28.0")]
2323
#[doc(inline)]
2424
pub use alloc_system::System;
2525

0 commit comments

Comments
 (0)