Function crosvm_control::crosvm_client_balloon_stats
source · #[no_mangle]
pub unsafe extern "C" fn crosvm_client_balloon_stats(
socket_path: *const c_char,
stats: *mut BalloonStatsFfi,
actual: *mut u64,
) -> bool
Expand description
Returns balloon stats of the crosvm instance whose control socket is listening on socket_path
.
The parameters stats
and actual
are optional and will only be written to if they are
non-null.
The function returns true on success or false if an error occurred.
§Note
Entries in BalloonStatsFfi
that are not available will be set to -1
.
§Safety
Function is unsafe due to raw pointer usage - socket_path
should be a non-null pointer to a C
string that is valid for reads and not modified for the duration of the call. stats
should be
a pointer to a BalloonStatsFfi
valid for writes that is not modified for the duration of this
call, and actual
should be a pointer to a u64
valid for writes that is not modified for the
duration of this call.