mirror of
https://github.com/rclone/rclone.git
synced 2024-11-27 02:45:16 +01:00
0ef0e908ca
Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
19 lines
501 B
Go
19 lines
501 B
Go
// Package debug contains functions for dealing with runtime/debug functions across go versions
|
|
package debug
|
|
|
|
import (
|
|
"runtime/debug"
|
|
)
|
|
|
|
// SetGCPercent calls the runtime/debug.SetGCPercent function to set the garbage
|
|
// collection percentage.
|
|
func SetGCPercent(percent int) int {
|
|
return debug.SetGCPercent(percent)
|
|
}
|
|
|
|
// SetMemoryLimit calls the runtime/debug.SetMemoryLimit function to set the
|
|
// soft-memory limit.
|
|
func SetMemoryLimit(limit int64) int64 {
|
|
return debug.SetMemoryLimit(limit)
|
|
}
|