From e8240fa5408b3d2e38ca0c5c487264c289365874 Mon Sep 17 00:00:00 2001 From: Kai Luo Date: Sun, 3 Mar 2024 22:00:34 +0800 Subject: [PATCH] Add comment --- core/port.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/port.go b/core/port.go index 161ac18..cd7b0ec 100644 --- a/core/port.go +++ b/core/port.go @@ -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