aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exec.c19
-rw-r--r--include/exec/ram_addr.h1
-rw-r--r--memory.c2
3 files changed, 1 insertions, 21 deletions
diff --git a/exec.c b/exec.c
index 0bf0a6e7eb..d12cd42f4c 100644
--- a/exec.c
+++ b/exec.c
@@ -1676,25 +1676,6 @@ ram_addr_t qemu_ram_alloc_resizeable(ram_addr_t size, ram_addr_t maxsz,
return qemu_ram_alloc_internal(size, maxsz, resized, NULL, true, mr, errp);
}
-void qemu_ram_free_from_ptr(ram_addr_t addr)
-{
- RAMBlock *block;
-
- qemu_mutex_lock_ramlist();
- QLIST_FOREACH_RCU(block, &ram_list.blocks, next) {
- if (addr == block->offset) {
- QLIST_REMOVE_RCU(block, next);
- ram_list.mru_block = NULL;
- /* Write list before version */
- smp_wmb();
- ram_list.version++;
- g_free_rcu(block, rcu);
- break;
- }
- }
- qemu_mutex_unlock_ramlist();
-}
-
static void reclaim_ramblock(RAMBlock *block)
{
if (block->flags & RAM_PREALLOC) {
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 7115154bc1..d1d9963680 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -75,7 +75,6 @@ int qemu_get_ram_fd(ram_addr_t addr);
void *qemu_get_ram_block_host_ptr(ram_addr_t addr);
void *qemu_get_ram_ptr(ram_addr_t addr);
void qemu_ram_free(ram_addr_t addr);
-void qemu_ram_free_from_ptr(ram_addr_t addr);
int qemu_ram_resize(ram_addr_t base, ram_addr_t newsize, Error **errp);
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)