class ResizeableVmoMapper
Defined at line 22 of file ../../zircon/system/ulib/fzl/include/lib/fzl/resizeable-vmo-mapper.h
ResizeableVmoMapper is an extension of the basic OwnedVmoMapper utility which
allows resizing of the mapping after it has been created.
Public Methods
std::unique_ptr<ResizeableVmoMapper> Create (uint64_t size, const char * name, zx_vm_option_t map_options, fbl::RefPtr<VmarManager> vmar_manager, uint32_t cache_policy)
Defined at line 18 of file ../../zircon/system/ulib/fzl/resizeable-vmo-mapper.cc
void ResizeableVmoMapper ()
Defined at line 29 of file ../../zircon/system/ulib/fzl/include/lib/fzl/resizeable-vmo-mapper.h
void ~ResizeableVmoMapper ()
Defined at line 30 of file ../../zircon/system/ulib/fzl/include/lib/fzl/resizeable-vmo-mapper.h
void ResizeableVmoMapper (const ResizeableVmoMapper & )
Defined at line 31 of file ../../zircon/system/ulib/fzl/include/lib/fzl/resizeable-vmo-mapper.h
ResizeableVmoMapper & operator= (const ResizeableVmoMapper & )
Defined at line 31 of file ../../zircon/system/ulib/fzl/include/lib/fzl/resizeable-vmo-mapper.h
void ResizeableVmoMapper (ResizeableVmoMapper && other)
Move support
Defined at line 34 of file ../../zircon/system/ulib/fzl/include/lib/fzl/resizeable-vmo-mapper.h
zx_status_t CreateAndMap (uint64_t size, const char * name, zx_vm_option_t map_options, fbl::RefPtr<VmarManager> vmar_manager, uint32_t cache_policy)
See |VmoMapper::CreateAndMap|
Defined at line 35 of file ../../zircon/system/ulib/fzl/resizeable-vmo-mapper.cc
ResizeableVmoMapper & operator= (ResizeableVmoMapper && other)
Defined at line 36 of file ../../zircon/system/ulib/fzl/include/lib/fzl/resizeable-vmo-mapper.h
zx_status_t Map (zx::vmo vmo, uint64_t offset, uint64_t size, zx_vm_option_t map_options, fbl::RefPtr<VmarManager> vmar_manager)
See |VmoMapper::Map|
Defined at line 49 of file ../../zircon/system/ulib/fzl/resizeable-vmo-mapper.cc
zx_status_t Shrink (size_t size)
Attempts to reduce both the VMO size and the VMAR mapping from |size_| to |size|.
The start address of the mapping, |start_|, remains unchanged as a result of this call.
Failure conditions:
Attempting to shrink the mapping to a size of zero or requesting a "shrink" that would increase
the mapping size returns an error.
If |size| is not page-aligned, shrinking will fail.
On failure, the mapping will be safe to use, but will remain at its original size.
Defined at line 61 of file ../../zircon/system/ulib/fzl/resizeable-vmo-mapper.cc
zx_status_t Grow (size_t size)
Attempts to increase both the VMO size and the VMAR mapping from |size_| to |size|.
Note that the VMAR mapping, and hence its start address, |start_|, might change. So it is not
safe to retain any pointers computed using the old mapping's addresses. The client is
expected to ensure their usage of the mapping is safe across a call to Grow().
Unlike shrinking, it's permissible to grow to a non-page-aligned |size|.
Failure conditions:
Attempting to grow the mapping to a size smaller than the current size will return an error.
On failure, the mapping will be safe to use, but will remain at its original size.
Defined at line 88 of file ../../zircon/system/ulib/fzl/resizeable-vmo-mapper.cc