revert slat clearing

This commit is contained in:
chrislu
2022-12-25 00:23:06 -08:00
parent 01231941af
commit 4f4fc36944
-3
View File
@@ -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)