Skip to content

Commit e9030af

Browse files
committed
Move global allocator from uefi_std to uefi_alloc
Signed-off-by: Tim Crawford <tcrawford@system76.com>
1 parent 22ae53b commit e9030af

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

crates/uefi_alloc/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ use uefi::memory::MemoryType;
66
use uefi::status::Status;
77
use uefi::system::SystemTable;
88

9+
#[global_allocator]
10+
static ALLOCATOR: Allocator = Allocator;
11+
912
static mut UEFI: Option<NonNull<SystemTable>> = None;
1013

1114
pub unsafe fn init(table: &'static mut SystemTable) {

crates/uefi_std/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,6 @@ pub mod proto;
140140
pub mod shell;
141141
pub mod vars;
142142

143-
#[global_allocator]
144-
static ALLOCATOR: uefi_alloc::Allocator = uefi_alloc::Allocator;
145-
146143
static mut HANDLE: uefi::Handle = uefi::Handle(0);
147144
static mut SYSTEM_TABLE: *mut uefi::system::SystemTable = 0 as *mut uefi::system::SystemTable;
148145

crates/uefi_std/src/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub use core::prelude::v1::{
3838
#[allow(deprecated)]
3939
#[doc(hidden)]
4040
pub use core::prelude::v1::{
41-
bench, global_allocator, test, test_case, Clone, Copy, Debug, Default, Eq, Hash, Ord,
41+
bench, test, test_case, Clone, Copy, Debug, Default, Eq, Hash, Ord,
4242
PartialEq, PartialOrd,
4343
};
4444

0 commit comments

Comments
 (0)