sing-box/experimental/libbox/memory.go
2023-03-02 15:04:59 +08:00

9 lines
130 B
Go

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