From a6911117af0d9f003f64a43d66ba01c3e843ca63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Tue, 11 Apr 2023 18:52:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8F=AF=E7=94=A8=E5=86=85?= =?UTF-8?q?=E5=AD=98=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/nodes/node_status_executor_unix.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/nodes/node_status_executor_unix.go b/internal/nodes/node_status_executor_unix.go index 4c4e1075..54d72d9e 100644 --- a/internal/nodes/node_status_executor_unix.go +++ b/internal/nodes/node_status_executor_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package nodes @@ -31,7 +32,7 @@ func (this *NodeStatusExecutor) updateMem(status *nodeconfigs.NodeStatus) { if minFreeMemory > 1<<30 { minFreeMemory = 1 << 30 } - if stat.Free < minFreeMemory { + if stat.Available > 0 && stat.Available < minFreeMemory { runtime.GC() debug.FreeOSMemory() }