Skip to content
This repository was archived by the owner on May 30, 2026. It is now read-only.

Commit 68b14f0

Browse files
committed
fix memGB
1 parent 2214582 commit 68b14f0

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

Overlayer/Tags/System.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public static class System {
3232

3333
[Tag(NotPlaying = true)]
3434
public static int ProcessorCount;
35+
[Tag(NotPlaying = true)]
36+
public static double MemoryGBytes;
3537
[Tag(NotPlaying = true, ProcessingFlags = ValueProcessing.RoundNumber)]
3638
public static double CpuUsage;
3739
[Tag(NotPlaying = true, ProcessingFlags = ValueProcessing.RoundNumber)]
@@ -40,6 +42,10 @@ public static class System {
4042
public static double MemoryUsage;
4143
[Tag(NotPlaying = true, ProcessingFlags = ValueProcessing.RoundNumber)]
4244
public static double TotalMemoryUsage;
45+
[Tag(NotPlaying = true)]
46+
public static double MemoryUsageGBytes;
47+
[Tag(NotPlaying = true)]
48+
public static double TotalMemoryUsageGBytes;
4349

4450
private static long lastGCAllocatedMemory;
4551
private static Thread updateThread;
@@ -93,12 +99,17 @@ public static void Init() {
9399
if(cpu != null) {
94100
CpuUsage = cpu.Observe() / ProcessorCount;
95101
TotalCpuUsage = totCpu.Observe();
102+
}
96103

104+
if(mem != null) {
97105
var memUsage = mem.Observe() / 1048576;
98106
var usedTotal = totalMemMB - totMem.Observe();
99107

100108
MemoryUsage = memUsage / totalMemMB * 100d;
101109
TotalMemoryUsage = usedTotal / totalMemMB * 100d;
110+
111+
MemoryUsageGBytes = memUsage / 1024d;
112+
TotalMemoryUsageGBytes = usedTotal / 1024d;
102113
}
103114

104115
Thread.Sleep(Main.Settings.SystemTagUpdateRate);

0 commit comments

Comments
 (0)