File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 28
28
29
29
void memory_region_transaction_begin (void );
30
30
static void memory_region_transaction_commit (MemoryRegion * mr );
31
+ static void memory_region_destructor_container (MemoryRegion * mr );
31
32
32
33
typedef struct AddrRange AddrRange ;
33
34
@@ -87,6 +88,7 @@ static void make_contained(struct uc_struct *uc, MemoryRegion *current)
87
88
hwaddr addr = current -> addr ;
88
89
MemoryRegion * container = g_new (MemoryRegion , 1 );
89
90
memory_region_init (uc , container , int128_get64 (current -> size ));
91
+ container -> destructor = memory_region_destructor_container ;
90
92
memory_region_del_subregion (uc -> system_memory , current );
91
93
memory_region_add_subregion_overlap (container , 0 , current , current -> priority );
92
94
memory_region_add_subregion (uc -> system_memory , addr , container );
@@ -1091,6 +1093,11 @@ static void memory_region_destructor_ram(MemoryRegion *mr)
1091
1093
qemu_ram_free (mr -> uc , mr -> ram_block );
1092
1094
}
1093
1095
1096
+ static void memory_region_destructor_container (MemoryRegion * mr )
1097
+ {
1098
+ memory_region_filter_subregions (mr , 0 );
1099
+ }
1100
+
1094
1101
void memory_region_init (struct uc_struct * uc ,
1095
1102
MemoryRegion * mr ,
1096
1103
uint64_t size )
You can’t perform that action at this time.
0 commit comments