feat: #48 添加MemoryReportRawUsed 参数

This commit is contained in:
Akizon77
2025-12-01 19:07:44 +08:00
parent fed087b123
commit 256a6db04e
3 changed files with 4 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ func Ram() RamInfo {
return raminfo
}
raminfo.Total = v.Total
if runtime.GOOS == "windows" {
if runtime.GOOS == "windows" || !flags.MemoryReportRawUsed {
raminfo.Used = v.Total - v.Available
} else {
raminfo.Used = v.Total - v.Free - v.Buffers - v.Cached