mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-09 19:30:30 +08:00
优化代码
This commit is contained in:
@@ -12,6 +12,7 @@ func setMaxMemory(memoryGB int) {
|
||||
if memoryGB <= 0 {
|
||||
memoryGB = 1
|
||||
}
|
||||
var maxMemoryBytes = (int64(memoryGB) << 30) * 80 / 100 // 默认 80%
|
||||
|
||||
var maxMemoryBytes = (int64(memoryGB) << 30) * 75 / 100 // 默认 75%
|
||||
debug.SetMemoryLimit(maxMemoryBytes)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user