mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-17 23:07:50 +00:00
Move #[global_allocator] into allocator module (#714)
The Rust issue that the #[global_allocator] cannot be defined in submodules was fixed.
This commit is contained in:
committed by
GitHub
parent
817267e51c
commit
869a69e531
@@ -9,7 +9,6 @@
|
||||
extern crate alloc;
|
||||
|
||||
use core::panic::PanicInfo;
|
||||
use linked_list_allocator::LockedHeap;
|
||||
|
||||
pub mod allocator;
|
||||
pub mod gdt;
|
||||
@@ -18,9 +17,6 @@ pub mod memory;
|
||||
pub mod serial;
|
||||
pub mod vga_buffer;
|
||||
|
||||
#[global_allocator]
|
||||
static ALLOCATOR: LockedHeap = LockedHeap::empty();
|
||||
|
||||
pub fn init() {
|
||||
gdt::init();
|
||||
interrupts::init_idt();
|
||||
|
||||
Reference in New Issue
Block a user