mirror of
https://github.com/Vita3K/unicorn.git
synced 2024-11-27 07:10:45 +00:00
remove redundant uc_struct.ram
This commit is contained in:
parent
b4d7347fa8
commit
c23d387e2f
@ -95,7 +95,6 @@ struct uc_struct {
|
|||||||
void* cpu;
|
void* cpu;
|
||||||
|
|
||||||
MemoryRegion *system_memory; // qemu/exec.c
|
MemoryRegion *system_memory; // qemu/exec.c
|
||||||
MemoryRegion *ram;
|
|
||||||
MemoryRegion io_mem_rom; // qemu/exec.c
|
MemoryRegion io_mem_rom; // qemu/exec.c
|
||||||
MemoryRegion io_mem_notdirty; // qemu/exec.c
|
MemoryRegion io_mem_notdirty; // qemu/exec.c
|
||||||
MemoryRegion io_mem_unassigned; // qemu/exec.c
|
MemoryRegion io_mem_unassigned; // qemu/exec.c
|
||||||
|
@ -33,16 +33,16 @@
|
|||||||
// Unicorn engine
|
// Unicorn engine
|
||||||
MemoryRegion *memory_map(struct uc_struct *uc, ram_addr_t begin, size_t size, uint32_t perms)
|
MemoryRegion *memory_map(struct uc_struct *uc, ram_addr_t begin, size_t size, uint32_t perms)
|
||||||
{
|
{
|
||||||
uc->ram = g_new(MemoryRegion, 1);
|
MemoryRegion *ram = g_new(MemoryRegion, 1);
|
||||||
|
|
||||||
memory_region_init_ram(uc, uc->ram, NULL, "pc.ram", size, perms, &error_abort);
|
memory_region_init_ram(uc, ram, NULL, "pc.ram", size, perms, &error_abort);
|
||||||
|
|
||||||
memory_region_add_subregion(get_system_memory(uc), begin, uc->ram);
|
memory_region_add_subregion(get_system_memory(uc), begin, ram);
|
||||||
|
|
||||||
if (uc->current_cpu)
|
if (uc->current_cpu)
|
||||||
tlb_flush(uc->current_cpu, 1);
|
tlb_flush(uc->current_cpu, 1);
|
||||||
|
|
||||||
return uc->ram;
|
return ram;
|
||||||
}
|
}
|
||||||
|
|
||||||
int memory_free(struct uc_struct *uc)
|
int memory_free(struct uc_struct *uc)
|
||||||
|
Loading…
Reference in New Issue
Block a user