code: func getMemLimit(cgroupLimit uint64) uint64 {
  	si := &syscall.Sysinfo_t{}
  	err := syscall.Sysinfo(si)
  	if err != nil {
  		return cgroupLimit
  	}
  
  	physicalLimit := si.Totalram
  	if cgroupLimit > physicalLimit {
  		return physicalLimit
  	}
  	return cgroupLimit
  }
docs: // getMemory limit returns the memory limit for a given cgroup
  // If the configured memory limit is larger than the total memory on the sys, the
  // physical system memory size is returned