erigon-pulse/erigon-lib/mmap/total_memory_cgroups_stub.go
battlmonstr eb65ffbaa7
config: avoid OOM in docker using cgroups v2 limit (#6646) (#8632)
Tested on Debian 11 by:

    $ git revert HEAD
    $ make docker
    $ docker run --memory=8.8G <sha>

before the fix outputs:

    15.6 GB

after the fix outputs:

    8.8 GB
2023-11-01 09:02:34 +07:00

12 lines
168 B
Go

//go:build !linux
package mmap
import (
"errors"
)
func cgroupsMemoryLimit() (uint64, error) {
return 0, errors.New("cgroups not supported in this environment")
}