We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ALLOCATOR
allocator
1 parent bfe9ec6 commit 6b94964Copy full SHA for 6b94964
rust/kernel/allocator.rs
@@ -24,6 +24,9 @@ unsafe impl GlobalAlloc for KernelAllocator {
24
}
25
26
27
+#[global_allocator]
28
+static ALLOCATOR: KernelAllocator = KernelAllocator;
29
+
30
#[alloc_error_handler]
31
fn oom(_layout: Layout) -> ! {
32
panic!("Out of memory!");
rust/kernel/lib.rs
@@ -213,6 +213,3 @@ macro_rules! container_of {
213
unsafe { ($ptr as *const _ as *const u8).offset(-offset) as *const $type }
214
}}
215
216
-
217
-#[global_allocator]
218
-static ALLOCATOR: allocator::KernelAllocator = allocator::KernelAllocator;
0 commit comments