diff --git a/pkg/sentry/control/usage.go b/pkg/sentry/control/usage.go index b1416a0c8..1a919ab39 100644 --- a/pkg/sentry/control/usage.go +++ b/pkg/sentry/control/usage.go @@ -142,6 +142,8 @@ func (u *Usage) Reduce(opts *UsageReduceOpts, out *UsageReduceOutput) error { if opts.Wait { mf.WaitForEvictions() } + // Also reduce Sentry memory usage by garbage-collecting now. + runtime.GC() return nil }