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 {