优化gateway-减少GC

This commit is contained in:
boyce
2020-11-03 14:59:01 +08:00
parent 974fbd3584
commit 18606016a1

View File

@@ -74,7 +74,7 @@ func makeByteSlice(size int) []byte{
}
func releaseByteSlice(byteBuff []byte) bool {
func ReleaseByteSlice(byteBuff []byte) bool {
for i:=0;i<len(memAreaPoolList);i++{
if cap(byteBuff) <= memAreaPoolList[i].maxAreaValue {
return memAreaPoolList[i].releaseByteSlice(byteBuff)