mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore]: Bump github.com/KimMachineGun/automemlimit from 0.4.0 to 0.5.0 (#2560)
This commit is contained in:
14
vendor/github.com/KimMachineGun/automemlimit/memlimit/exp_system.go
generated
vendored
Normal file
14
vendor/github.com/KimMachineGun/automemlimit/memlimit/exp_system.go
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
package memlimit
|
||||
|
||||
import (
|
||||
"github.com/pbnjay/memory"
|
||||
)
|
||||
|
||||
// FromSystem returns the total memory of the system.
|
||||
func FromSystem() (uint64, error) {
|
||||
limit := memory.TotalMemory()
|
||||
if limit == 0 {
|
||||
return 0, ErrNoLimit
|
||||
}
|
||||
return limit, nil
|
||||
}
|
Reference in New Issue
Block a user