# Functions

ApplyFallback is a helper Provider function that sets the fallback provider.
ApplyRationA is a helper Provider function that applies the given ratio to the given provider.
FromCgroup returns the memory limit based on the cgroups version on this system.
FromCgroupHybrid returns the memory limit from the cgroup v1 or v2.
FromCgroupV1 returns the memory limit from the cgroup v1.
FromCgroupV2 returns the memory limit from the cgroup v2.
FromSystem returns the total memory of the system.
Limit is a helper Provider function that returns the given limit.
SetGoMemLimit sets GOMEMLIMIT with the value from the cgroup's memory limit and given ratio.
SetGoMemLimitWithEnv sets GOMEMLIMIT with the value from the environment variables.
SetGoMemLimitWithOpts sets GOMEMLIMIT with options and environment variables.
SetGoMemLimitWithProvider sets GOMEMLIMIT with the value from the given provider and ratio.
WithEnv configures whether to use environment variables.
WithLogger configures the logger.
WithProvider configures the provider.
WithRatio configures the ratio of the memory limit to set as GOMEMLIMIT.

# Variables

ErrCgroupsNotSupported is returned when the system does not support cgroups.
ErrNoCgroup is returned when the process is not in cgroup.
ErrNoLimit is returned when the memory limit is not set.

# Structs

Experiments is a set of experiment flags.

# Type aliases

Option is a function that configures the behavior of SetGoMemLimitWithOptions.
Provider is a function that returns the memory limit.