1
0
mirror of https://github.com/rclone/rclone.git synced 2025-06-30 22:23:52 +02:00
Files
rclone/lib/debug/go1.19.go
2022-11-10 12:07:18 +00:00

15 lines
272 B
Go

//go:build go1.19
// +build go1.19
package debug
import (
"runtime/debug"
)
// SetMemoryLimit calls the runtime/debug.SetMemoryLimit function to set the
// soft-memory limit.
func SetMemoryLimit(limit int64) (int64, error) {
return debug.SetMemoryLimit(limit), nil
}