Skip to content

fix activity storage issues #231

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

Merged
merged 3 commits into from
May 3, 2020
Merged

fix activity storage issues #231

merged 3 commits into from
May 3, 2020

Conversation

Enchufa2
Copy link
Member

@Enchufa2 Enchufa2 commented May 3, 2020

Fix memory issues in trap(), synchronize() and rollback(). These are stateful activities that require storing information about passing arrivals to manage clones or redirections. These activities were not properly cleaning their storage when arrivals were rejected at some point in the trajectory. As a result, certain simulations with these activities involved may show random improper behaviour depending on how memory reuse happens. This patch unifies storage management for stateful activities, adds a new interface to register these activities and another interface for arrivals to notify their termination, so that the stored information is properly cleaned up.

@codecov
Copy link

codecov bot commented May 3, 2020

Codecov Report

Merging #231 into master will decrease coverage by 0.10%.
The diff coverage is 97.72%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #231      +/-   ##
==========================================
- Coverage   99.74%   99.64%   -0.11%     
==========================================
  Files          46       47       +1     
  Lines        2791     2822      +31     
==========================================
+ Hits         2784     2812      +28     
- Misses          7       10       +3     
Impacted Files Coverage Δ
inst/include/simmer/activity.h 97.91% <0.00%> (-2.09%) ⬇️
inst/include/simmer/activity/resource.h 100.00% <ø> (ø)
inst/include/simmer/process/arrival.h 98.51% <87.50%> (-1.49%) ⬇️
inst/include/simmer/activity/async.h 100.00% <100.00%> (ø)
inst/include/simmer/activity/branch.h 100.00% <100.00%> (ø)
inst/include/simmer/activity/fork.h 100.00% <100.00%> (ø)
inst/include/simmer/activity/renege.h 100.00% <100.00%> (ø)
inst/include/simmer/activity/rollback.h 100.00% <100.00%> (ø)
inst/include/simmer/activity/storage.h 100.00% <100.00%> (ø)
src/activity.cpp 100.00% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dbd51bc...44cc268. Read the comment docs.

@Enchufa2 Enchufa2 merged commit a6d4aa2 into master May 3, 2020
@Enchufa2 Enchufa2 deleted the fix/activity-storage branch May 3, 2020 15:06
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.

1 participant