mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 04:35:36 +00:00
memory: Eliminate memory_region_destructor_ram_from_ptr()
The function is equivalent to memory_region_destructor_ram(), so it's not needed anymore. Backports commit fc3e7665d7fe1b2f842441d250d7afec26b8a910 from qemu
This commit is contained in:
parent
26791ea61b
commit
d52f55b46d
|
@ -822,11 +822,6 @@ static void memory_region_destructor_alias(MemoryRegion *mr)
|
|||
memory_region_unref(mr->alias);
|
||||
}
|
||||
|
||||
static void memory_region_destructor_ram_from_ptr(MemoryRegion *mr)
|
||||
{
|
||||
qemu_ram_free(mr->uc, mr->ram_addr);
|
||||
}
|
||||
|
||||
static bool memory_region_need_escape(char c)
|
||||
{
|
||||
return c == '/' || c == '[' || c == '\\' || c == ']';
|
||||
|
@ -1178,7 +1173,7 @@ void memory_region_init_ram_ptr(struct uc_struct *uc, MemoryRegion *mr,
|
|||
memory_region_init(uc, mr, owner, name, size);
|
||||
mr->ram = true;
|
||||
mr->terminates = true;
|
||||
mr->destructor = memory_region_destructor_ram_from_ptr;
|
||||
mr->destructor = memory_region_destructor_ram;
|
||||
mr->dirty_log_mask = tcg_enabled(uc) ? (1 << DIRTY_MEMORY_CODE) : 0;
|
||||
|
||||
/* qemu_ram_alloc_from_ptr cannot fail with ptr != NULL. */
|
||||
|
|
Loading…
Reference in a new issue