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…
49 free_regions: [SpinLock<MmioFreeRegionList>; MMIO_BUDDY_REGION_COUNT as usize], field54 let mut free_regions: [MaybeUninit<SpinLock<MmioFreeRegionList>>; in new() localVariable57 free_regions[i as usize] = MaybeUninit::new(SpinLock::new(MmioFreeRegionList::new())); in new()59 let free_regions = unsafe { in new() localVariable61 free_regions, in new()68 free_regions, in new()122 let mut list_guard = self.free_regions[exp2index(exp)].lock(); in give_back_block()176 &mut self.free_regions[exp2index(e) as usize].lock(); in query_addr_region()188 &mut self.free_regions[exp2index(e2 - 1) as usize].lock(); in query_addr_region()202 match self.pop_block(&mut self.free_regions[exp2index(e2) as usize].lock()) in query_addr_region()[all …]