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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user