1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-01 11:35:23 +00:00

leverage local buffer

This commit is contained in:
v2ray 2016-07-17 12:59:57 +02:00
parent 7e499ee0b6
commit 1931820c4c
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -36,7 +36,7 @@ func (this *BufferedSegmentWriter) Write(seg Segment) {
}
if this.buffer == nil {
this.buffer = alloc.NewSmallBuffer().Clear()
this.buffer = alloc.NewLocalBuffer(2048).Clear()
}
this.buffer.Value = seg.Bytes(this.buffer.Value)