From cc3a104593ee3d08975d00ef833f56eceb35f3d1 Mon Sep 17 00:00:00 2001 From: choplin Date: Fri, 11 Sep 2015 13:47:03 +0900 Subject: [PATCH] Ensure that process.MemoryInfo returns a up-to-date value. --- process/process_linux.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/process/process_linux.go b/process/process_linux.go index bcb207b..52baf9a 100644 --- a/process/process_linux.go +++ b/process/process_linux.go @@ -153,6 +153,10 @@ func (p *Process) CPUAffinity() ([]int32, error) { return nil, common.NotImplementedError } func (p *Process) MemoryInfo() (*MemoryInfoStat, error) { + _, _, err := p.fillFromStatm() + if err != nil { + return nil, err + } return p.memInfo, nil } func (p *Process) MemoryInfoEx() (*MemoryInfoExStat, error) {