Initial QSfera import
This commit is contained in:
+14
@@ -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