File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ use spin::Mutex;
12
12
/// A frame allocator that uses buddy system, requiring a global allocator.
13
13
///
14
14
/// The max order of the allocator is specified via the const generic parameter `ORDER`. The frame
15
- /// allocator will only be able to allocate ranges of size up to 2\*\* ORDER, out of a total range of
16
- /// size at most 2\*\*( ORDER + 1) - 1.
15
+ /// allocator will only be able to allocate ranges of size up to 2<sup> ORDER</sup> , out of a total
16
+ /// range of size at most 2<sup> ORDER + 1</sup> - 1.
17
17
///
18
18
/// # Usage
19
19
///
@@ -41,7 +41,7 @@ pub struct FrameAllocator<const ORDER: usize = 32> {
41
41
impl < const ORDER : usize > FrameAllocator < ORDER > {
42
42
/// Create an empty frame allocator
43
43
pub fn new ( ) -> Self {
44
- FrameAllocator {
44
+ Self {
45
45
free_list : array:: from_fn ( |_| BTreeSet :: default ( ) ) ,
46
46
allocated : 0 ,
47
47
total : 0 ,
@@ -157,7 +157,7 @@ pub struct LockedFrameAllocator<const ORDER: usize = 32>(Mutex<FrameAllocator<OR
157
157
impl < const ORDER : usize > LockedFrameAllocator < ORDER > {
158
158
/// Creates an empty heap
159
159
pub fn new ( ) -> Self {
160
- LockedFrameAllocator ( Mutex :: new ( FrameAllocator :: new ( ) ) )
160
+ Self ( Mutex :: new ( FrameAllocator :: new ( ) ) )
161
161
}
162
162
}
163
163
You can’t perform that action at this time.
0 commit comments