From 33e0cfe233e06769e0616cda78d6a5e29e912b1f Mon Sep 17 00:00:00 2001 From: v2ray Date: Fri, 15 Jul 2016 15:17:06 +0200 Subject: [PATCH] fully allocate buffer pools --- common/alloc/buffer_pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/alloc/buffer_pool.go b/common/alloc/buffer_pool.go index ea119f30..373ba89e 100644 --- a/common/alloc/buffer_pool.go +++ b/common/alloc/buffer_pool.go @@ -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