From a29ac16632aec6065c72985b9f7eeb1ca6fbef4a Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 6 Nov 2015 19:20:04 -0200 Subject: exec: Eliminate qemu_ram_free_from_ptr() Replace qemu_ram_free_from_ptr() with qemu_ram_free(). The only difference between qemu_ram_free_from_ptr() and qemu_ram_free() is that g_free_rcu() is used instead of call_rcu(reclaim_ramblock). We can safely replace it because: * RAM blocks allocated by qemu_ram_alloc_from_ptr() always have RAM_PREALLOC set; * reclaim_ramblock(block) will do nothing except g_free(block) if RAM_PREALLOC is set at block->flags. Signed-off-by: Eduardo Habkost Message-Id: <1446844805-14492-2-git-send-email-ehabkost@redhat.com> Signed-off-by: Paolo Bonzini --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'memory.c') diff --git a/memory.c b/memory.c index e193658fc7..cf5b05f898 100644 --- a/memory.c +++ b/memory.c @@ -861,7 +861,7 @@ static void memory_region_destructor_ram(MemoryRegion *mr) static void memory_region_destructor_ram_from_ptr(MemoryRegion *mr) { - qemu_ram_free_from_ptr(mr->ram_addr); + qemu_ram_free(mr->ram_addr); } static void memory_region_destructor_rom_device(MemoryRegion *mr) -- cgit v1.2.3