class VmarManager
Defined at line 29 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmar-manager.h
VmarManager
A small utility class which manages the lifecycle of a VMAR intended to be
shared among a collection of users. VmarManager will handle simple tasks such as
automatically destroying the VMAR at end-of-life in addition to releasing the
handle.
Currently, the primary use case for a VmarManager is to be used to create a
COMPACT sub-vmar in order to hold a number of VMO mappings while minimizing
page table fragmentation..
See fzl::VmoMapper.
Public Methods
fbl::RefPtr<VmarManager> Create (size_t size, fbl::RefPtr<VmarManager> parent, zx_vm_option_t options)
Create a new VmarManager (creating the underlying VMAR object in the
process)
size : the size of the VMAR region to create.
parent : the parent of this VMAR, or nullptr to use the root VMAR.
options : creation options to pass to vmar_allocate
Defined at line 13 of file ../../zircon/system/ulib/fzl/vmar-manager.cc
zx::result<fbl::RefPtr<VmarManager>> Use (const zx::unowned_vmar & vmar)
Create a new VmarManager that wraps an existing vmar, without making a child vmar inside
of it. This is meant to facilitate the use of a non-root vmars, that like a root vmar, are
guaranteed to never be destroyed while the process is running. An example of this is the
vmar provided to drivers by the driver framework.
WARNING: This vmar must NOT be destroyed while this VmarManager, or any children of it,
are alive inside the process.
vmar : the VMAR to use
Defined at line 43 of file ../../zircon/system/ulib/fzl/vmar-manager.cc
const zx::vmar & vmar ()
Defined at line 53 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmar-manager.h
void * start ()
Defined at line 54 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmar-manager.h
uint64_t size ()
Defined at line 55 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmar-manager.h
const fbl::RefPtr<VmarManager> & parent ()
Defined at line 56 of file ../../zircon/system/ulib/fzl/include/lib/fzl/vmar-manager.h
Friends
class RefPtr