From 9709e45ad2bedf192eec1e85ca9cce7c67276a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sun, 5 Mar 2023 21:19:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=AF=E5=86=85=E5=AD=98?= =?UTF-8?q?=E9=99=90=E5=88=B6=E8=AE=BE=E7=BD=AE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/utils/system_1.19.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/utils/system_1.19.go b/internal/utils/system_1.19.go index 8ada108..5a267b2 100644 --- a/internal/utils/system_1.19.go +++ b/internal/utils/system_1.19.go @@ -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)