mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Also run Go garbage collection as part of Usage.Reduce.
The `Usage.Reduce` RPC's promise is to reclaim as much Sentry memory as possible and to give it back to the host. Seems like running Go GC should be part of that. PiperOrigin-RevId: 547312564
This commit is contained in:
committed by
gVisor bot
parent
f8c4846f21
commit
f9219588c6
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user