mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
arch: let arch_memory_regions return all available regions
The previous `arch_memory_regions` function will provide some memory regions with the specified memory size and fill all the previous regions before using the next one, but sometimes there may be no need to fill up the previous one, e.g., the previous one should be aligned with hugepage size. This commit make `arch_memory_regions` function not take any parameters and return the max available regions, the memory manager can use them on demand. Fixes: #5463 Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com>
This commit is contained in:
@@ -933,7 +933,7 @@ impl MemoryManager {
|
||||
)
|
||||
} else {
|
||||
// Init guest memory
|
||||
let arch_mem_regions = arch::arch_memory_regions(ram_size);
|
||||
let arch_mem_regions = arch::arch_memory_regions();
|
||||
|
||||
let ram_regions: Vec<(GuestAddress, usize)> = arch_mem_regions
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user