SUMMARY
Read the current size of a VMO object.
Declaration
#include <zircon/syscalls.h>
zx_status_t zx_vmo_get_size(zx_handle_t handle, uint64_t* size);
Description
zx_vmo_get_size()
returns the current size of the virtual memory
object (VMO). The size
specified when creating a VMO (e.g. with zx_vmo_create()
), and when
resizing a VMO with zx_vmo_set_size()
will be rounded up to the next
system page size boundary. So the value returned by zx_vmo_get_size()
will always be page-aligned.
Rights
TODO(https://fxbug.dev/42107318)
Return value
zx_vmo_get_size()
returns ZX_OK
on success. In the event
of failure, a negative error value is returned.
Errors
ZX_ERR_BAD_HANDLE
handle is not a valid handle.
ZX_ERR_WRONG_TYPE
handle is not a VMO handle.
ZX_ERR_INVALID_ARGS
size is an invalid pointer or NULL.
See also
zx_vmo_create()
zx_vmo_create_child()
zx_vmo_op_range()
zx_vmo_read()
zx_vmo_set_size()
zx_vmo_write()
Read the current size of a VMO object.