From 83f3c251422b0724044f976a7ff26b2e8a47c374 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sun, 7 Oct 2012 12:59:55 +0200 Subject: memory: add address_space_destroy() Since address spaces can be created dynamically by device hotplug, they can also be destroyed dynamically. Signed-off-by: Avi Kivity --- memory.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'memory.h') diff --git a/memory.h b/memory.h index d36c2baa23..79393f1a76 100644 --- a/memory.h +++ b/memory.h @@ -804,6 +804,18 @@ void mtree_info(fprintf_function mon_printf, void *f); */ void address_space_init(AddressSpace *as, MemoryRegion *root); + +/** + * address_space_destroy: destroy an address space + * + * Releases all resources associated with an address space. After an address space + * is destroyed, its root memory region (given by address_space_init()) may be destroyed + * as well. + * + * @as: address space to be destroyed + */ +void address_space_destroy(AddressSpace *as); + /** * address_space_rw: read from or write to an address space. * -- cgit v1.2.3