1# zx_vmar_destroy 2 3## NAME 4 5<!-- Updated by update-docs-from-abigen, do not edit. --> 6 7vmar_destroy - destroy a virtual memory address region 8 9## SYNOPSIS 10 11<!-- Updated by update-docs-from-abigen, do not edit. --> 12 13``` 14#include <zircon/syscalls.h> 15 16zx_status_t zx_vmar_destroy(zx_handle_t handle); 17``` 18 19## DESCRIPTION 20 21`zx_vmar_destroy()` unmaps all mappings within the given region, and destroys 22all sub-regions of the region. Note that this operation is logically recursive. 23 24This operation does not close *handle*. Any outstanding handles to this 25VMAR will remain valid handles, but all VMAR operations on them will fail. 26 27## RIGHTS 28 29<!-- Updated by update-docs-from-abigen, do not edit. --> 30 31TODO(ZX-2399) 32 33## RETURN VALUE 34 35`zx_vmar_destroy()` returns **ZX_OK** on success. 36 37## ERRORS 38 39**ZX_ERR_BAD_HANDLE** *handle* is not a valid handle. 40 41**ZX_ERR_WRONG_TYPE** *handle* is not a VMAR handle. 42 43**ZX_ERR_BAD_STATE** This region is already destroyed. 44 45## NOTES 46 47## SEE ALSO 48 49 - [`zx_vmar_allocate()`] 50 - [`zx_vmar_map()`] 51 - [`zx_vmar_protect()`] 52 - [`zx_vmar_unmap()`] 53 54<!-- References updated by update-docs-from-abigen, do not edit. --> 55 56[`zx_vmar_allocate()`]: vmar_allocate.md 57[`zx_vmar_map()`]: vmar_map.md 58[`zx_vmar_protect()`]: vmar_protect.md 59[`zx_vmar_unmap()`]: vmar_unmap.md 60