mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-16 09:26:21 -05:00
use local stack buffer
This commit is contained in:
parent
f45fa6e918
commit
4aadaa7513
@ -33,7 +33,9 @@ func MarshalCommand(command interface{}, writer io.Writer) error {
|
||||
return ErrUnknownCommand
|
||||
}
|
||||
|
||||
buffer := alloc.NewSmallBuffer().Clear()
|
||||
buffer := alloc.NewLocalBuffer(512).Clear()
|
||||
defer buffer.Release()
|
||||
|
||||
err := factory.Marshal(command, buffer)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user