1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-10-01 22:54:03 -04:00

remove small buffer pool

This commit is contained in:
Darien Raymond
2016-11-01 12:37:35 +01:00
parent aabb9137e1
commit 43dacc3936
4 changed files with 2 additions and 17 deletions

View File

@@ -200,11 +200,6 @@ func (b *Buffer) String() string {
return string(b.Value)
}
// NewSmallBuffer creates a Buffer with 1K bytes of arbitrary content.
func NewSmallBuffer() *Buffer {
return smallPool.Allocate()
}
// NewBuffer creates a Buffer with 8K bytes of arbitrary content.
func NewBuffer() *Buffer {
return mediumPool.Allocate()
@@ -216,10 +211,6 @@ func NewLargeBuffer() *Buffer {
}
func NewBufferWithSize(size int) *Buffer {
if size <= SmallBufferSize {
return NewSmallBuffer()
}
if size <= BufferSize {
return NewBuffer()
}