Lines Matching refs:order
217 fn order2index(order: u8) -> usize { in order2index()
218 order as usize - MIN_ORDER in order2index()
226 fn pop_front(&mut self, order: u8) -> Option<PhysAddr> { in pop_front()
306 let result: Option<PhysAddr> = alloc_in_specific_order(order); in pop_front()
313 let mut current_order = (order + 1) as usize; in pop_front()
328 while current_order > order as usize { in pop_front()
355 let mut order = log2(count.data()); in buddy_alloc() localVariable
356 if count.data() & ((1 << order) - 1) != 0 { in buddy_alloc()
357 order += 1; in buddy_alloc()
359 let order = (order + MIN_ORDER) as u8; in buddy_alloc() localVariable
360 if order as usize >= MAX_ORDER { in buddy_alloc()
366 let free_addr = self.pop_front(order); in buddy_alloc()
373 .map(|addr| (addr, PageFrameCount::new(1 << (order as usize - MIN_ORDER)))); in buddy_alloc()
382 unsafe fn buddy_free(&mut self, mut base: PhysAddr, order: u8) { in buddy_free()
384 let mut order = order as usize; in buddy_free() localVariable
386 while order < MAX_ORDER { in buddy_free()
388 if base.data() & ((1 << (order)) - 1) != 0 { in buddy_free()
392 order in buddy_free()
398 let buddy_addr = PhysAddr::new(base.data() ^ (1 << order)); in buddy_free()
400 let first_page_list_paddr = self.free_area[Self::order2index(order as u8)]; in buddy_free()
408 if likely(order != MAX_ORDER - 1) { in buddy_free()
435 let mut page_list_paddr = self.free_area[Self::order2index(order as u8)]; in buddy_free()
510 let new_page_list_addr = if order == MIN_ORDER { in buddy_free()
529 1 << order, in buddy_free()
532 first_page_list_paddr == self.free_area[Self::order2index(order as u8)] in buddy_free()
537 self.free_area[Self::order2index(order as u8)] = new_page_list_addr; in buddy_free()
541 let first_page_list_paddr = self.free_area[Self::order2index(order as u8)]; in buddy_free()
571 order += 1; in buddy_free()
574 assert!(order == MAX_ORDER - 1); in buddy_free()
598 let mut order = log2(count.data()); in free() localVariable
599 if count.data() & ((1 << order) - 1) != 0 { in free()
600 order += 1; in free()
602 let order = (order + MIN_ORDER) as u8; in free() localVariable
604 self.buddy_free(base, order); in free()