Skip to content

Commit

Permalink
use local stack buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Jul 16, 2016
1 parent f45fa6e commit 4aadaa7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/protocol/raw/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4aadaa7

Please sign in to comment.