1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-11-23 12:02:58 -05:00

small buffer

This commit is contained in:
Darien Raymond
2016-11-21 22:08:34 +01:00
parent c041740940
commit 70c75038a2
8 changed files with 67 additions and 24 deletions

View File

@@ -205,18 +205,9 @@ func NewBuffer() *Buffer {
return mediumPool.Allocate()
}
// NewLargeBuffer creates a Buffer with 64K bytes of arbitrary content.
//func NewLargeBuffer() *Buffer {
// return largePool.Allocate()
//}
//func NewBufferWithSize(size int) *Buffer {
// if size <= BufferSize {
// return NewBuffer()
// }
//
// return NewLargeBuffer()
//}
func NewSmallBuffer() *Buffer {
return smallPool.Allocate()
}
func NewLocalBuffer(size int) *Buffer {
return CreateBuffer(make([]byte, size), nil)