mirror of https://github.com/v2ray/v2ray-core
fully allocate buffer pools
parent
9e8ed30052
commit
33e0cfe233
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue