pub struct Limits {
pub wall_timeout: Duration,
pub max_response_bytes: u32,
pub max_stderr_bytes: u64,
pub address_space_bytes: Option<u64>,
pub cpu_seconds: u64,
pub file_size_bytes: u64,
pub max_processes: u64,
pub max_resident_bytes: Option<u64>,
}Expand description
Resource and output limits for one adapter class.
Fields§
§wall_timeout: DurationWall-clock ceiling enforced by the parent.
max_response_bytes: u32Ceiling on the response frame payload, checked against the declared length before allocation.
max_stderr_bytes: u64Ceiling on stderr bytes, drained and counted concurrently.
address_space_bytes: Option<u64>RLIMIT_AS for the child, in bytes. None leaves the limit
unset, the shape a profile takes on a platform where the mapped
accelerator runtime reserves a virtual range no sane cap sits
above; the resident-memory guard below is the bound there.
cpu_seconds: u64RLIMIT_CPU for the child, in seconds.
file_size_bytes: u64RLIMIT_FSIZE for the child, in bytes. Caps regular-file growth inside the jail. Stdout is a pipe, so the response cap above is enforced by the parent instead.
max_processes: u64RLIMIT_NPROC for the child: this invocation’s spawn budget, so
a compromised adapter cannot fork-bomb the host. The limit
counts every process of the mapped real user id, not just this
invocation’s descendants, so the helper applies the number as
headroom above the count that already exists at spawn, clamped
to the hard limit. The semantic is defined there once and
holds for every profile. A count the host will not answer
refuses the run with process-count-unavailable, never a
substituted baseline.
max_resident_bytes: Option<u64>Parent-side ceiling on the aggregate resident bytes of the
child’s whole process group, engine descendants included. The
parent polls the group while the child runs, kills the group
when the sum crosses the ceiling, and fails closed with
worker-memory-exceeded. A failed measurement is itself a
failure, memory-monitor-failed, never a silent pass. None
disables the monitor, the shape of every profile whose worker
spawns no engine child.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more