validate_memory_size

Function validate_memory_size 

Source
pub fn validate_memory_size(
    size_str: &str,
    min_bytes: u64,
    max_bytes: u64,
) -> Result<u64>
Expand description

Validate memory size is within reasonable bounds

Checks that the memory size is:

  • At least the minimum required
  • Not excessively large (sanity check)