diff options
Diffstat (limited to 'weed/util/mem/slot_pool.go')
| -rw-r--r-- | weed/util/mem/slot_pool.go | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/weed/util/mem/slot_pool.go b/weed/util/mem/slot_pool.go index 16b497af5..70f2525b3 100644 --- a/weed/util/mem/slot_pool.go +++ b/weed/util/mem/slot_pool.go @@ -1,9 +1,7 @@ package mem import ( - "github.com/seaweedfs/seaweedfs/weed/glog" "sync" - "sync/atomic" ) var pools []*sync.Pool @@ -41,13 +39,8 @@ func getSlotPool(size int) (*sync.Pool, bool) { return pools[index], true } -var total int64 - func Allocate(size int) []byte { if pool, found := getSlotPool(size); found { - newVal := atomic.AddInt64(&total, 1) - glog.V(4).Infof("++> %d", newVal) - slab := *pool.Get().(*[]byte) return slab[:size] } @@ -56,8 +49,6 @@ func Allocate(size int) []byte { func Free(buf []byte) { if pool, found := getSlotPool(cap(buf)); found { - newVal := atomic.AddInt64(&total, -1) - glog.V(4).Infof("--> %d", newVal) pool.Put(&buf) } } |
