mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-07 18:30:25 +08:00
修改软内存限制设置错误
This commit is contained in:
@@ -16,7 +16,7 @@ func setMaxMemory(memoryGB int) {
|
||||
if memoryGB > 10 {
|
||||
maxMemoryBytes = int64(memoryGB-2) << 30 // 超过10G内存的允许剩余2G内存
|
||||
} else {
|
||||
maxMemoryBytes = (int64(memoryGB) << 30) * 100 / 80 // 默认 80%
|
||||
maxMemoryBytes = (int64(memoryGB) << 30) * 80 / 100 // 默认 80%
|
||||
}
|
||||
|
||||
debug.SetMemoryLimit(maxMemoryBytes)
|
||||
|
||||
Reference in New Issue
Block a user