pub struct Balloon {
pub amount_mib: u32,
pub deflate_on_oom: Option<bool>,
pub stats_polling_interval_s: Option<u32>,
}
Expand description
Represents a memory balloon device that can dynamically adjust guest memory size. This device allows for memory overcommitment by reclaiming unused memory from the guest and making it available to the host or other guests. It’s particularly useful in environments where memory resources need to be managed efficiently across multiple VMs.
Fields§
§amount_mib: u32
Target balloon size in MiB
deflate_on_oom: Option<bool>
Whether the balloon should deflate when the guest has memory pressure
stats_polling_interval_s: Option<u32>
Interval in seconds between refreshing statistics. A non-zero value will enable the statistics. Defaults to 0
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Balloon
impl<'de> Deserialize<'de> for Balloon
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Balloon
impl RefUnwindSafe for Balloon
impl Send for Balloon
impl Sync for Balloon
impl Unpin for Balloon
impl UnwindSafe for Balloon
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more