mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
osdep, kvm: rename low-level RAM allocation functions
This is preparatory to the introduction of a separate freeing API. Reported-by: Amos Kong <akong@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Amos Kong <akong@redhat.com> Message-id: 1368454796-14989-2-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
d34dc45d34
commit
6eebf958ab
9 changed files with 18 additions and 19 deletions
6
exec.c
6
exec.c
|
@ -1062,7 +1062,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
|
|||
#if defined (__linux__) && !defined(TARGET_S390X)
|
||||
new_block->host = file_ram_alloc(new_block, size, mem_path);
|
||||
if (!new_block->host) {
|
||||
new_block->host = qemu_vmalloc(size);
|
||||
new_block->host = qemu_anon_ram_alloc(size);
|
||||
memory_try_enable_merging(new_block->host, size);
|
||||
}
|
||||
#else
|
||||
|
@ -1074,9 +1074,9 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
|
|||
xen_ram_alloc(new_block->offset, size, mr);
|
||||
} else if (kvm_enabled()) {
|
||||
/* some s390/kvm configurations have special constraints */
|
||||
new_block->host = kvm_vmalloc(size);
|
||||
new_block->host = kvm_ram_alloc(size);
|
||||
} else {
|
||||
new_block->host = qemu_vmalloc(size);
|
||||
new_block->host = qemu_anon_ram_alloc(size);
|
||||
}
|
||||
memory_try_enable_merging(new_block->host, size);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue