mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-15 09:53:01 -06:00
[chore]: Bump github.com/KimMachineGun/automemlimit from 0.3.0 to 0.4.0 (#2440)
Bumps [github.com/KimMachineGun/automemlimit](https://github.com/KimMachineGun/automemlimit) from 0.3.0 to 0.4.0. - [Commits](https://github.com/KimMachineGun/automemlimit/compare/v0.3.0...v0.4.0) --- updated-dependencies: - dependency-name: github.com/KimMachineGun/automemlimit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
9b03840b42
commit
cd1611362f
8 changed files with 63 additions and 32 deletions
7
vendor/github.com/KimMachineGun/automemlimit/memlimit/cgroups.go
generated
vendored
7
vendor/github.com/KimMachineGun/automemlimit/memlimit/cgroups.go
generated
vendored
|
|
@ -21,7 +21,7 @@ func FromCgroup() (uint64, error) {
|
|||
case cgroups.Legacy:
|
||||
return FromCgroupV1()
|
||||
case cgroups.Hybrid:
|
||||
return fromCgroupHybrid()
|
||||
return FromCgroupHybrid()
|
||||
case cgroups.Unified:
|
||||
return FromCgroupV2()
|
||||
}
|
||||
|
|
@ -49,10 +49,9 @@ func FromCgroupV1() (uint64, error) {
|
|||
return 0, ErrNoLimit
|
||||
}
|
||||
|
||||
// fromCgroupHybrid returns the memory limit from the cgroup v1 or v2.
|
||||
// FromCgroupHybrid returns the memory limit from the cgroup v1 or v2.
|
||||
// It checks the cgroup v2 first, and if it fails, it falls back to cgroup v1.
|
||||
// TODO: make this function public in the next minor version.
|
||||
func fromCgroupHybrid() (uint64, error) {
|
||||
func FromCgroupHybrid() (uint64, error) {
|
||||
limit, err := fromCgroupV2(filepath.Join(cgroupMountPoint, "unified"))
|
||||
if err == nil {
|
||||
return limit, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue