Use kernel page size for the sys_closes perf buffer

This commit is contained in:
M. Mert Yildiran
2022-06-07 17:25:52 +03:00
parent c94821b9d2
commit 4f84194362

View File

@@ -74,7 +74,7 @@ func (p *tlsPoller) init(bpfObjects *tlsTapperObjects, bufferSize int) error {
return errors.Wrap(err, 0)
}
p.sysCloses, err = perf.NewReader(bpfObjects.SysCloses, bufferSize)
p.sysCloses, err = perf.NewReader(bpfObjects.SysCloses, os.Getpagesize())
if err != nil {
return errors.Wrap(err, 0)