Skip to content

Commit 8dc1f68

Browse files
Asphalttbrb
authored andcommitted
Reduce unnecessary stack consuming of libpcap
Because the `filter_pcap_*` subprogs use its own stack memory, it is unnecessary to reserved 80B stack memory. Therefore, `filter_pcap_*` subprogs can use the whole stack memory. Signed-off-by: Leon Hwang <[email protected]>
1 parent 767a159 commit 8dc1f68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/libpcap/compile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const (
2828
type StackOffset int
2929

3030
const (
31-
BpfReadKernelOffset StackOffset = -8*(iota+1) - 80
31+
BpfReadKernelOffset StackOffset = -8 * (iota + 1)
3232
R1Offset
3333
R2Offset
3434
R3Offset

0 commit comments

Comments
 (0)