diff --git a/kernel/model/import.go b/kernel/model/import.go index 941cc1ab1..3dd5dc16d 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -31,7 +31,7 @@ import ( "os" "path" "path/filepath" - "runtime/debug" + "runtime" "sort" "strconv" "strings" @@ -708,8 +708,9 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) { } IncSync() } - debug.FreeOSMemory() + IncSync() + runtime.GC() return } diff --git a/kernel/model/mount.go b/kernel/model/mount.go index 1b7c6b74a..06b419bfb 100644 --- a/kernel/model/mount.go +++ b/kernel/model/mount.go @@ -21,7 +21,6 @@ import ( "fmt" "os" "path/filepath" - "runtime/debug" "strings" "time" "unicode/utf8" @@ -132,7 +131,6 @@ func unmount0(boxID string) { boxConf.Closed = true box.SaveConf(boxConf) box.Unindex() - debug.FreeOSMemory() } func Mount(boxID string) (alreadyMount bool, err error) {