mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-25 19:45:38 -05:00
fully allocate buffer pools
This commit is contained in:
@@ -16,7 +16,7 @@ func NewBufferPool(bufferSize, poolSize int) *BufferPool {
|
||||
New: func() interface{} { return make([]byte, bufferSize) },
|
||||
},
|
||||
}
|
||||
for i := 0; i < poolSize/2; i++ {
|
||||
for i := 0; i < poolSize; i++ {
|
||||
pool.chain <- make([]byte, bufferSize)
|
||||
}
|
||||
return pool
|
||||
|
||||
Reference in New Issue
Block a user