zx_vmo_get_stream_size

SUMMARY

Read the current stream size of a VMO object.

Declaration

#include <zircon/syscalls.h>

zx_status_t zx_vmo_get_stream_size(zx_handle_t handle, uint64_t* size);

Description

zx_vmo_get_stream_size() returns the current stream size of the virtual memory object (VMO). The stream size specified when creating a VMO (e.g. with zx_vmo_create()) or resizing a VMO (e.g. with zx_vmo_set_stream_size()) will not be rounded up to the next system page size boundary. So, unlike the VMO size, the value returned by zx_vmo_get_stream_size() will not necessarily be page-aligned.

Rights

handle must be of type ZX_OBJ_TYPE_VMO.

Return value

zx_vmo_get_stream_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

Read the current stream size of a VMO object.