Add ios memory limit

This commit is contained in:
世界
2023-03-02 15:04:59 +08:00
parent e8802357e1
commit 8151bcfd6b
3 changed files with 12 additions and 4 deletions
+8
View File
@@ -0,0 +1,8 @@
package libbox
import "runtime/debug"
func SetMemoryLimit() {
debug.SetGCPercent(10)
debug.SetMemoryLimit(30 * 1024 * 1024)
}