From ceb0c31cd06607a3a3ed45edbd308c0b16ed1cc2 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 11 Oct 2023 07:24:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/caches/memory_fragment_pool.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/caches/memory_fragment_pool.go b/internal/caches/memory_fragment_pool.go index a9928a2..2ab2c67 100644 --- a/internal/caches/memory_fragment_pool.go +++ b/internal/caches/memory_fragment_pool.go @@ -22,13 +22,15 @@ const ( maxMemoryFragmentPoolItemAgeSeconds = 60 ) -var SharedFragmentMemoryPool = NewMemoryFragmentPool() +var SharedFragmentMemoryPool *MemoryFragmentPool func init() { if !teaconst.IsMain { return } + SharedFragmentMemoryPool = NewMemoryFragmentPool() + goman.New(func() { var ticker = time.NewTicker(200 * time.Millisecond) for range ticker.C {