sing-box/experimental/libbox/memory.go
2023-03-15 14:56:06 +08:00

11 lines
149 B
Go

//go:build darwin
package libbox
import "runtime/debug"
func SetMemoryLimit() {
debug.SetGCPercent(10)
debug.SetMemoryLimit(30 * 1024 * 1024)
}