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

Memory buffer could be stack allocated, saving global memory. #178

Open
MHotchin opened this issue Oct 1, 2022 · 2 comments
Open

Memory buffer could be stack allocated, saving global memory. #178

MHotchin opened this issue Oct 1, 2022 · 2 comments
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@MHotchin
Copy link

MHotchin commented Oct 1, 2022

No description provided.

@MHotchin
Copy link
Author

MHotchin commented Oct 1, 2022

Currently the memory buffer used to send and receive the UDP packet is allocated in the NTP object.

It is only ever used in one function, it could be allocated as a stack object instead.

@MHotchin
Copy link
Author

MHotchin commented Oct 1, 2022

My mistake - it's used in two places, but none of the data in the buffer is reused. It could be stack allocated in both functions.

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Oct 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants