"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
rc: add core/gc to run a garbage collection on demand
Nick Craig-Wood3a2248aa5fc5
diff --git a/docs/content/rc.md b/docs/content/rc.mdindex d3ed5b63a..182a18b12 100644--- a/docs/content/rc.md+++ b/docs/content/rc.md@@ -97,6 +97,12 @@ EgThe format of the parameter is exactly the same as passed to --bwlimitexcept only one bandwidth may be specified.+### core/gc: Runs a garbage collection.++This tells the go runtime to do a garbage collection run. It isn't+necessary to call this normally, but it can be useful for debugging+memory problems.+### core/memstats: Returns the memory statisticsThis returns the memory statistics of the running program. What the values meandiff --git a/fs/rc/internal.go b/fs/rc/internal.goindex 307d852e1..33228d292 100644--- a/fs/rc/internal.go+++ b/fs/rc/internal.go@@ -57,6 +57,16 @@ The most interesting values for most people are:* HeapSys: This is the amount of memory rclone has obtained from the OS* Sys: this is the total amount of memory requested from the OS* It is virtual memory so may include unused memory+`,+ })+ Add(Call{+ Path: "core/gc",+ Fn: rcGc,+ Title: "Runs a garbage collection.",+ Help: `+This tells the go runtime to do a garbage collection run. It isn't+necessary to call this normally, but it can be useful for debugging+memory problems.`,})}@@ -112,3 +122,10 @@ func rcMemStats(in Params) (out Params, err error) {out["OtherSys"] = m.OtherSysreturn out, nil}++// Do a garbage collection run+func rcGc(in Params) (out Params, err error) {+ out = make(Params)+ runtime.GC()+ return out, nil+}