增加最大内存用量

This commit is contained in:
GoEdgeLab
2023-11-22 17:03:42 +08:00
parent 37f6aa1870
commit d42ccfcafb
+1 -1
View File
@@ -13,6 +13,6 @@ func setMaxMemory(memoryGB int) {
memoryGB = 1 memoryGB = 1
} }
var maxMemoryBytes = (int64(memoryGB) << 30) * 75 / 100 // 默认 75% var maxMemoryBytes = (int64(memoryGB) << 30) * 80 / 100 // 默认 80%
debug.SetMemoryLimit(maxMemoryBytes) debug.SetMemoryLimit(maxMemoryBytes)
} }