Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-allocate map sys.Errors #1052

Merged
merged 1 commit into from
Jun 7, 2023
Merged

Pre-allocate map sys.Errors #1052

merged 1 commit into from
Jun 7, 2023

Conversation

hmahmood
Copy link
Contributor

@hmahmood hmahmood commented Jun 6, 2023

This is showing up in memory profiles on some of our internal deployments. Seems like an easy gain.

Copy link
Collaborator

@lmb lmb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! One nit, otherwise this is good to go.

@@ -14,6 +14,12 @@ import (
"github.com/cilium/ebpf/internal/unix"
)

var (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment why we're preallocating them here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thank you for the review.

Signed-off-by: Hasan Mahmood <hasan.mahmood@datadoghq.com>
Copy link
Collaborator

@lmb lmb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lmb lmb merged commit 5bc4c7c into cilium:master Jun 7, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants