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

This commit is contained in:
刘祥超
2023-10-16 14:28:07 +08:00
parent 3909695b44
commit 2acf890b8e
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")
}