MySQL 9.7.0
Source Code Documentation
my_system_cgroup Namespace Reference

Functions

std::optional< uint64_t > get_cgroup_memory (const std::optional< uint64_t > &self_memory, const std::optional< uint64_t > &root_memory)
 Determine cgroup memory given memory limits from self and root cgroups. More...
 

Function Documentation

◆ get_cgroup_memory()

std::optional< uint64_t > my_system_cgroup::get_cgroup_memory ( const std::optional< uint64_t > &  self_memory,
const std::optional< uint64_t > &  root_memory 
)

Determine cgroup memory given memory limits from self and root cgroups.

In some scenarios, it is possible to find memory limits in both self cgroup (read and parsed from /proc/self/cgroup) as well as root cgroup.

Parameters
[in]self_memoryMemory discovered from our own cgroup
[in]root_memoryMemory discovered from the root cgroup
Returns
Final memory to be considered when determining cgroup memory limit or nullopt otherwise.
Note
Return value of 0 indicates no limits