Add ios memory limit
This commit is contained in:
8
experimental/libbox/memory.go
Normal file
8
experimental/libbox/memory.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package libbox
|
||||
|
||||
import "runtime/debug"
|
||||
|
||||
func SetMemoryLimit() {
|
||||
debug.SetGCPercent(10)
|
||||
debug.SetMemoryLimit(30 * 1024 * 1024)
|
||||
}
|
||||
Reference in New Issue
Block a user