Only set mobile memory limit on supported Go versions

This commit is contained in:
Neil Alexander 2023-09-03 13:13:49 +01:00
parent 12a3a8c73b
commit c8b9aaeb67
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 19 additions and 2 deletions

View file

@ -0,0 +1,10 @@
//go:build go1.20
// +build go1.20
package mobile
import "runtime/debug"
func setMemLimitIfPossible() {
debug.SetMemoryLimit(1024 * 1024 * 40)
}