File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,24 +8,24 @@ extern crate alloc;
8
8
mod page;
9
9
10
10
use allocator:: { AllocResult , BaseAllocator , ByteAllocator , PageAllocator } ;
11
- use allocator:: { BitmapPageAllocator , BuddyByteAllocator } ;
11
+ use allocator:: { BitmapPageAllocator , SlabByteAllocator } ;
12
12
use core:: alloc:: { GlobalAlloc , Layout } ;
13
13
use spinlock:: SpinNoIrq ;
14
14
15
15
const PAGE_SIZE : usize = 0x1000 ;
16
- const MIN_HEAP_SIZE : usize = 0x4000 ; // 16 K
16
+ const MIN_HEAP_SIZE : usize = 0x8000 ; // 32 K
17
17
18
18
pub use page:: GlobalPage ;
19
19
20
20
pub struct GlobalAllocator {
21
- balloc : SpinNoIrq < BuddyByteAllocator > , // TODO: use IRQ-disabled lock
21
+ balloc : SpinNoIrq < SlabByteAllocator > ,
22
22
palloc : SpinNoIrq < BitmapPageAllocator < PAGE_SIZE > > ,
23
23
}
24
24
25
25
impl GlobalAllocator {
26
26
pub const fn new ( ) -> Self {
27
27
Self {
28
- balloc : SpinNoIrq :: new ( BuddyByteAllocator :: new ( ) ) ,
28
+ balloc : SpinNoIrq :: new ( SlabByteAllocator :: new ( ) ) ,
29
29
palloc : SpinNoIrq :: new ( BitmapPageAllocator :: new ( ) ) ,
30
30
}
31
31
}
You can’t perform that action at this time.
0 commit comments