Skip to main content

MAX_CONFIG_BYTES

Constant MAX_CONFIG_BYTES 

pub const MAX_CONFIG_BYTES: usize = _; // 1_048_576usize
Expand description

The most bytes a RunConfig TOML may occupy, read or produced.

oniro’s own default-config is a few kilobytes of TOML and a tuned trial adds one scalar per searched parameter, so a mebibyte is two orders of magnitude above the largest configuration this harness can legitimately see — but small enough that a runaway oniro_cli or a mistaken base file cannot decide how much memory the tuner allocates or how much disk one trial writes. It is sixteen times the meta.json bound the final-metric reader already enforces, reflecting that a full run configuration is genuinely larger than one metric record.

The same number bounds all three otherwise-unbounded config paths: the text captured from oniro_cli default-config, the base config a child reads back from disk, and every per-segment config a trial writes into its run root.