Skip to content

Commit

Permalink
[CWS] remove runtime.GC call after snapshot (#33099)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulcacheux authored Feb 12, 2025
1 parent 5b40f43 commit b051f31
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/security/probe/probe_ebpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"net"
"os"
"path/filepath"
"runtime"
"slices"
"strings"
"sync"
Expand Down Expand Up @@ -1676,8 +1675,6 @@ func (p *EBPFProbe) RefreshUserCache(containerID containerutils.ContainerID) err
// Snapshot runs the different snapshot functions of the resolvers that
// require to sync with the current state of the system
func (p *EBPFProbe) Snapshot() error {
// the snapshot for the read of a lot of file which can allocate a lot of memory.
defer runtime.GC()
return p.Resolvers.Snapshot()
}

Expand Down

0 comments on commit b051f31

Please sign in to comment.