限制内存缓存最大容量为系统内存的三分之一

This commit is contained in:
GoEdgeLab
2023-10-16 14:28:07 +08:00
parent 81e5a5ca34
commit 836c92ed24
3 changed files with 24 additions and 9 deletions

View File

@@ -8,4 +8,7 @@ func TestSystemMemoryGB(t *testing.T) {
t.Log(SystemMemoryGB())
t.Log(SystemMemoryGB())
t.Log(SystemMemoryGB())
t.Log(SystemMemoryBytes())
t.Log(SystemMemoryBytes())
t.Log(SystemMemoryBytes()>>30, "GB")
}