aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-01-17 03:21:31 -0800
committerchrislu <chris.lu@gmail.com>2022-01-17 03:21:31 -0800
commitda7f13e73e110ad7b33124cae119ccd51ef3f194 (patch)
tree0fc0a013ea225c8b361b13135d897b333ddb741f
parent6c908352cbc0791299b16c57815610204ea39f26 (diff)
downloadseaweedfs-da7f13e73e110ad7b33124cae119ccd51ef3f194.tar.xz
seaweedfs-da7f13e73e110ad7b33124cae119ccd51ef3f194.zip
Revert "testing skip memory management"
This reverts commit 6c908352cbc0791299b16c57815610204ea39f26.
-rw-r--r--weed/util/mem/slot_pool.go2
1 files changed, 0 insertions, 2 deletions
diff --git a/weed/util/mem/slot_pool.go b/weed/util/mem/slot_pool.go
index a871188b5..e6680d3cb 100644
--- a/weed/util/mem/slot_pool.go
+++ b/weed/util/mem/slot_pool.go
@@ -35,12 +35,10 @@ func getSlotPool(size int) *sync.Pool {
}
func Allocate(size int) []byte {
- return make([]byte, size)
slab := *getSlotPool(size).Get().(*[]byte)
return slab[:size]
}
func Free(buf []byte) {
- return
getSlotPool(cap(buf)).Put(&buf)
}