initialize_memory_bounds

Function initialize_memory_bounds 

Source
pub fn initialize_memory_bounds(
    configuration: MemoryBoundsConfiguration,
    component_registry: ComponentRegistryHandle,
) -> Result<MemoryLimiter, GenericError>
Expand description

Initializes the memory bounds system and verifies any configured bounds based on the configured memory mode.

When no memory limit is configured and DOCKER_DD_AGENT is set to a non-empty value, the limit is read from the process cgroup instead.

See MemoryMode for details on the behavior of each mode.

ยงErrors

If the bounds could not be validated under MemoryMode::Strict, or if the configured grant is invalid, an error is returned.