Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bzEq committed Mar 3, 2024
1 parent 6503ae9 commit e8240fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (self *RawNetPort) growBuffer() {
l := len(self.buf)
if l == 0 {
if self.nr == 0 {
// If DEFAULT_BUFFER_SIZE is too small, times of buffer allocation will increase and thus hurt performance.
l = DEFAULT_BUFFER_SIZE
} else {
l = self.nr * 2
Expand Down

0 comments on commit e8240fa

Please sign in to comment.