fully allocate buffer pools

pull/215/head
v2ray 2016-07-15 15:17:06 +02:00
parent 9e8ed30052
commit 33e0cfe233
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ func NewBufferPool(bufferSize, poolSize int) *BufferPool {
New: func() interface{} { return make([]byte, bufferSize) }, 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) pool.chain <- make([]byte, bufferSize)
} }
return pool return pool