Searched refs:free_regions (Results 1 – 2 of 2) sorted by relevance
88 │ free_regions │135 free_regions: [SpinLock<MmioFreeRegionList>; MMIO_BUDDY_REGION_COUNT as usize],156 …池中内存块的总大小(pool_size),同时其维护了大小为`MMIO_BUDDY_REGION_COUNT`的双向链表数组(free_regions)。`free_regions`中的各个链表维…158 …free_regions`的下标(index)与内存块的大小有关。由于每个内存块大小都为$2^{n}$ bytes,那么可以令$exp = n$。index与exp的换算公式如下:$index =…160   作为内存分配机制,buddy服务于所有进程,为了解决在各个进程之间实现free_regions中的链表数据同步的问题,`free_regions`中的链表类型采用加了 {re…
46 free_regions: [SpinLock<MmioFreeRegionList>; MMIO_BUDDY_REGION_COUNT as usize], field52 let mut free_regions: [MaybeUninit<SpinLock<MmioFreeRegionList>>; in new() localVariable55 free_regions[i as usize] = MaybeUninit::new(SpinLock::new(MmioFreeRegionList::new())); in new()57 let free_regions = unsafe { in new() localVariable63 >(free_regions) in new()69 free_regions, in new()132 let mut list_guard = self.free_regions[exp2index(exp)].lock(); in give_back_block()186 &mut self.free_regions[exp2index(e)].lock(); in query_addr_region()198 &mut self.free_regions[exp2index(e2 - 1)].lock(); in query_addr_region()212 match self.pop_block(&mut self.free_regions[exp2index(e2)].lock()) { in query_addr_region()[all …]