Browse Source

revert slat clearing

pull/4089/head
chrislu 2 years ago
parent
commit
4f4fc36944
  1. 3
      weed/util/mem/slot_pool.go

3
weed/util/mem/slot_pool.go

@ -42,9 +42,6 @@ func getSlotPool(size int) (*sync.Pool, bool) {
func Allocate(size int) []byte {
if pool, found := getSlotPool(size); found {
slab := *pool.Get().(*[]byte)
for i, _ := range slab {
slab[i] = 0
}
return slab[:size]
}
return make([]byte, size)

Loading…
Cancel
Save