pub struct GpuMemConsumer {
pub oom_threshold: f64,
pub gpu_total_bytes: u64,
}Expand description
Processes GPU memory events from the BPF ring buffer.
Fields§
§oom_threshold: f64OOM warning threshold as fraction of total GPU memory (0.0 - 1.0).
gpu_total_bytes: u64Total GPU memory per device in bytes (for OOM calculation).
Implementations§
Source§impl GpuMemConsumer
impl GpuMemConsumer
pub fn new(oom_threshold: f64, gpu_total_bytes: u64) -> Self
Sourcepub fn process_event(&self, raw: &[u8]) -> Option<GpuMemEvent>
pub fn process_event(&self, raw: &[u8]) -> Option<GpuMemEvent>
Process a raw event from the BPF ring buffer. Returns the deserialized event, or None if the buffer is too small.
Auto Trait Implementations§
impl Freeze for GpuMemConsumer
impl RefUnwindSafe for GpuMemConsumer
impl Send for GpuMemConsumer
impl Sync for GpuMemConsumer
impl Unpin for GpuMemConsumer
impl UnwindSafe for GpuMemConsumer
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