diff options
Diffstat (limited to 'include/system')
| -rw-r--r-- | include/system/memory.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/system/memory.h b/include/system/memory.h index 827e2c5aa4..08daf0fc59 100644 --- a/include/system/memory.h +++ b/include/system/memory.h @@ -2735,12 +2735,25 @@ void address_space_init(AddressSpace *as, MemoryRegion *root, const char *name); * Note that destruction of the AddressSpace is done via RCU; * it is therefore not valid to free the memory the AddressSpace * struct is in until after that RCU callback has completed. + * If you want to g_free() the AddressSpace after destruction you + * can do that with address_space_destroy_free(). * * @as: address space to be destroyed */ void address_space_destroy(AddressSpace *as); /** + * address_space_destroy_free: destroy an address space and free it + * + * This does the same thing as address_space_destroy(), and then also + * frees (via g_free()) the AddressSpace itself once the destruction + * is complete. + * + * @as: address space to be destroyed + */ +void address_space_destroy_free(AddressSpace *as); + +/** * address_space_remove_listeners: unregister all listeners of an address space * * Removes all callbacks previously registered with memory_listener_register() |