From 1cce863bbbf208b2516ca2a58946d3cebe72c55e Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Wed, 20 Apr 2022 17:12:33 +0300 Subject: [PATCH] Bring back `debug.FreeOSMemory()` call --- tap/api/tcp_streams_map.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tap/api/tcp_streams_map.go b/tap/api/tcp_streams_map.go index d2297e9ab..750721508 100644 --- a/tap/api/tcp_streams_map.go +++ b/tap/api/tcp_streams_map.go @@ -2,6 +2,7 @@ package api import ( "runtime" + "runtime/debug" "sync" "time" @@ -42,6 +43,7 @@ func (streamMap *TcpStreamMap) CloseTimedoutTcpStreamChannels() { for { <-ticker.C + debug.FreeOSMemory() streamMap.Streams.Range(func(key interface{}, value interface{}) bool { stream := value.(*TcpStream) if stream.ProtoIdentifier.Protocol == nil {