mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 15:27:29 -06:00
[chore]: Bump github.com/KimMachineGun/automemlimit from 0.4.0 to 0.5.0 (#2560)
This commit is contained in:
parent
4e0488acfe
commit
a858831387
18 changed files with 513 additions and 108 deletions
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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue