From 4543df2ace6e7cf4378addbc777f113dfc63a641 Mon Sep 17 00:00:00 2001 From: bufferflies <1045931706@qq.com> Date: Thu, 4 Jan 2024 15:51:01 +0800 Subject: [PATCH] rename Signed-off-by: bufferflies <1045931706@qq.com> --- pkg/memory/meminfo.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/memory/meminfo.go b/pkg/memory/meminfo.go index 3194da27044..64505e2e5f3 100644 --- a/pkg/memory/meminfo.go +++ b/pkg/memory/meminfo.go @@ -52,10 +52,10 @@ func MemTotalNormal() (uint64, error) { if time.Since(t) < 60*time.Second { return total, nil } - return memTotalNormal() + return totalMem() } -func memTotalNormal() (uint64, error) { +func totalMem() (uint64, error) { v, err := mem.VirtualMemory() if err != nil { return 0, err @@ -200,7 +200,7 @@ func InitMemoryHook() { if err != nil { return } - physicalValue, err := memTotalNormal() + physicalValue, err := totalMem() if err != nil { return }