sing-box/experimental/libbox/memory.go

9 lines
130 B
Go
Raw Normal View History

2023-03-02 05:13:12 +00:00
package libbox
import "runtime/debug"
func SetMemoryLimit() {
debug.SetGCPercent(10)
debug.SetMemoryLimit(30 * 1024 * 1024)
}