mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 09:41:44 +08:00
0c56c46523
Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
15 lines
272 B
Go
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
|
|
}
|