mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-08 10:50:24 +08:00
增加软内存最大值限制
This commit is contained in:
@@ -23,5 +23,11 @@ func SystemMemoryGB() int {
|
||||
}
|
||||
|
||||
systemTotalMemory = int(stat.Total / 1024 / 1024 / 1024)
|
||||
if systemTotalMemory <= 0 {
|
||||
systemTotalMemory = 1
|
||||
}
|
||||
|
||||
setMaxMemory(systemTotalMemory)
|
||||
|
||||
return systemTotalMemory
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user