mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 05:28:36 -07: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
|
|
@ -101,7 +101,7 @@ void *qemu_memalign(size_t alignment, size_t size)
|
|||
}
|
||||
|
||||
/* alloc shared memory pages */
|
||||
void *qemu_vmalloc(size_t size)
|
||||
void *qemu_anon_ram_alloc(size_t size)
|
||||
{
|
||||
size_t align = QEMU_VMALLOC_ALIGN;
|
||||
size_t total = size + align - getpagesize();
|
||||
|
|
@ -125,7 +125,7 @@ void *qemu_vmalloc(size_t size)
|
|||
munmap(ptr + size, total - size);
|
||||
}
|
||||
|
||||
trace_qemu_vmalloc(size, ptr);
|
||||
trace_qemu_anon_ram_alloc(size, ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue