File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -69,12 +69,12 @@ impl<const PAGE_SIZE: usize> BaseAllocator for BitmapPageAllocator<PAGE_SIZE> {
6969 // But if this creates a gap that would exceed bitmap capacity,
7070 // use the start address itself as base.
7171 let aligned_base = crate :: align_down ( start, MAX_ALIGN_1GB ) ;
72- let start_idx = ( start - aligned_base) / PAGE_SIZE ;
72+ let gap_pages = ( start - aligned_base) / PAGE_SIZE ;
7373
74- if start_idx + self . total_pages <= BitAllocUsed :: CAP {
74+ if gap_pages + self . total_pages <= BitAllocUsed :: CAP {
7575 // Use MAX_ALIGN_1GB aligned base for maximum alignment support
7676 self . base = aligned_base;
77- self . inner . insert ( start_idx..start_idx + self . total_pages ) ;
77+ self . inner . insert ( gap_pages..gap_pages + self . total_pages ) ;
7878 } else {
7979 // Fall back to using start as base to fit within capacity
8080 // This may limit maximum alignment support, but prevents assertion failure
You can’t perform that action at this time.
0 commit comments