|
| From: | John Baboval |
| Subject: | [Qemu-devel] New Memory API Question |
| Date: | Wed, 26 Oct 2011 09:52:20 -0400 |
| User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Thunderbird/3.1.10 |
It's a question of flow. I'm following the code path through the creation of a new memory subregion. If I'm reading this properly, it would seem that a MemoryRegion - for example the ones used by VGA - go through the following flow:
memory_region_init_ram() - (mr->destructor is set to memory_region_destructor_ram)
memory_region_add_subregion(system_memory, ...) ->
memory_region_update_topology() ->
address_space_update_topology()
address_space_update_topology_part()
as_memory_range_add() - through the ops vector
memory_region_prepare_ram_addr()
At this point it seems that the destructor is overwritten with the
memory_region_destructor_iomem(), and it loses track of the proper way
to ever free the memory region. Is this correct, or am I missing something?
Or does it not matter because nobody ever calls memory_region_destroy for system memory regions?
Thanks, -John
| [Prev in Thread] | Current Thread | [Next in Thread] |