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