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

Avoid needless memory slot in allocator #836

Closed
kanigsson opened this issue Nov 2, 2021 · 3 comments · Fixed by #837
Closed

Avoid needless memory slot in allocator #836

kanigsson opened this issue Nov 2, 2021 · 3 comments · Fixed by #837
Assignees
Labels

Comments

@kanigsson
Copy link
Collaborator

The allocator currently systematically allocates a memory slot for Write statements that involve messages, but such a slot is not always needed. I will refine the condition to allocate the slot to represent the need of the session generator.

@kanigsson kanigsson added the bug label Nov 2, 2021
@kanigsson kanigsson self-assigned this Nov 2, 2021
@kanigsson kanigsson added this to To do in RecordFlux 0.6 via automation Nov 2, 2021
kanigsson added a commit that referenced this issue Nov 2, 2021
For a write statement, an allocation is not needed if the object to
be written is a simple variable. Taking this case into account in
the allocator.
@treiher
Copy link
Collaborator

treiher commented Nov 2, 2021

The special handling of Write statements will most probably be obsolete after implementation of #807. Write (as well as Read statements) will have to be in a separate state and refer to a global variable. Using a message aggregate inside a Write statement will not be supported anymore. So we can defer this issue until #807 is merged and then remove the extra allocation for Write statements completely.

@kanigsson
Copy link
Collaborator Author

We could do it that way, but this change here is beneficial for my changes on #713, so waiting on #807 would create an unneeded dependency. However, I'm OK with that if you think that this commit would lead to more issues/conflicts with #807.

@kanigsson kanigsson moved this from To do to Under review in RecordFlux 0.6 Nov 2, 2021
@treiher
Copy link
Collaborator

treiher commented Nov 2, 2021

Never mind, I did not see that you already created a PR for that. I just thought we could prevent unnecessary work, but as it is already fixed, we can also merge it now.

RecordFlux 0.6 automation moved this from Under review to Merged Nov 2, 2021
kanigsson added a commit that referenced this issue Nov 2, 2021
For a write statement, an allocation is not needed if the object to
be written is a simple variable. Taking this case into account in
the allocator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants