exec: remove code duplication in qemu_ram_alloc() and qemu_ram_alloc_from_ptr()
commit6977dfe6af975d72a8140dbc91effe8b8f2a58f8
authorYoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
Wed, 18 Aug 2010 06:41:49 +0000 (18 15:41 +0900)
committerAnthony Liguori <aliguori@us.ibm.com>
Sun, 22 Aug 2010 21:19:00 +0000 (22 16:19 -0500)
tree1705a04720bb2f8ffa700313babea13443a59ea6
parent9742bf26b1652eda6554bc2ebb11c515b89ec976
exec: remove code duplication in qemu_ram_alloc() and qemu_ram_alloc_from_ptr()

Since most of the code in qemu_ram_alloc() and
qemu_ram_alloc_from_ptr() are duplicated, let
qemu_ram_alloc_from_ptr() to switch by checking void *host, and change
qemu_ram_alloc() to a wrapper.

Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
exec.c