fix: Use cgroup-aware memory detection in mem limiter (#1806)