mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
优化gateway-减少GC
This commit is contained in:
@@ -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++{
|
for i:=0;i<len(memAreaPoolList);i++{
|
||||||
if cap(byteBuff) <= memAreaPoolList[i].maxAreaValue {
|
if cap(byteBuff) <= memAreaPoolList[i].maxAreaValue {
|
||||||
return memAreaPoolList[i].releaseByteSlice(byteBuff)
|
return memAreaPoolList[i].releaseByteSlice(byteBuff)
|
||||||
|
|||||||
Reference in New Issue
Block a user