Remove unmapped/freed memory regions from the object property list.
This commit fixes the following issues: - Any unmapped/free'd memory regions (MemoryRegion instances) are not removed from the object property linked list of its owner (which is always qdev_get_machine(uc)). This issue makes adding new memory mapping by calling mem_map() or mem_map_ptr() slower as more and more memory pages are mapped and unmapped - yes, even if those memory pages are unmapped, they still impact the speed of future memory page mappings due to this issue. - FlatView is not reconstructed after a memory region is freed during unmapping, which leads to a use-after-free the next time a new memory region is mapped in address_space_update_topology().
This commit is contained in:
@ -810,6 +810,8 @@ ObjectProperty *object_property_add(Object *obj, const char *name,
|
||||
|
||||
void object_property_del(struct uc_struct *uc, Object *obj, const char *name, Error **errp);
|
||||
|
||||
void object_property_del_child(struct uc_struct *uc, Object *obj, Object *child, Error **errp);
|
||||
|
||||
/**
|
||||
* object_property_find:
|
||||
* @obj: the object
|
||||
|
Reference in New Issue
Block a user