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

Put a single event on the recycle queue initially to avoid runtime malloc #351

Merged
merged 3 commits into from
Feb 7, 2024

Conversation

erlingrj
Copy link
Collaborator

@erlingrj erlingrj commented Feb 6, 2024

An LF program with n timers need n+1 events. The last event should initially reside in the recycle queue to avoid any runtime memory allocations. This PR puts on there if the program has timers.

Copy link
Contributor

@edwardalee edwardalee left a comment

Choose a reason for hiding this comment

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

Looks good to me. The comment needs clarification, but otherwise, this is good to merge.

core/reactor_common.c Outdated Show resolved Hide resolved
@lhstrh lhstrh added the enhancement Enhancement of existing feature label Feb 6, 2024
@erlingrj erlingrj merged commit 85d54a4 into main Feb 7, 2024
24 of 28 checks passed
@erlingrj erlingrj deleted the initialize-recycle-q branch February 8, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants