mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-12 14:58:44 +01:00
revert slat clearing
This commit is contained in:
1 parent
01231941af
commit
4f4fc36944
1 file changed
-3
@@ -42,9 +42,6 @@ func getSlotPool(size int) (*sync.Pool, bool) {
|
|||||||
func Allocate(size int) []byte {
|
func Allocate(size int) []byte {
|
||||||
if pool, found := getSlotPool(size); found {
|
if pool, found := getSlotPool(size); found {
|
||||||
slab := *pool.Get().(*[]byte)
|
slab := *pool.Get().(*[]byte)
|
||||||
for i, _ := range slab {
|
|
||||||
slab[i] = 0
|
|
||||||
}
|
|
||||||
return slab[:size]
|
return slab[:size]
|
||||||
}
|
}
|
||||||
return make([]byte, size)
|
return make([]byte, size)
|
||||||
|
|||||||
Reference in new issue
Block a user