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: Cleanup global variables and simplify allocate/deallocate logic #104

Merged
merged 2 commits into from
Feb 17, 2020

Conversation

stotko
Copy link
Owner

@stotko stotko commented Feb 17, 2020

The safe memory system currently relies on global variables for atomics and mutexes as well as for the internal allocation_manager class. However, global variables typically indicate bad design and should be avoided in general. Get rid of all of them by moving the instances of allocation_manager to the internal dispatch_allocation_manager function, which now also acts as the singleton function, and by significantly simplifying the internal allocate and deallocate logic.

@stotko stotko added this to the 1.3.0 milestone Feb 17, 2020
@stotko stotko changed the title memory: Cleanup global variables and simplify allocate/free logic memory: Cleanup global variables and simplify allocate/deallocate logic Feb 17, 2020
@codecov
Copy link

codecov bot commented Feb 17, 2020

Codecov Report

Merging #104 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #104   +/-   ##
=======================================
  Coverage   97.83%   97.83%           
=======================================
  Files          27       27           
  Lines        1613     1613           
=======================================
  Hits         1578     1578           
  Misses         35       35

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 f25325b...70f95fb. Read the comment docs.

@stotko stotko merged commit 07e3687 into master Feb 17, 2020
@stotko stotko deleted the memory_global_variable_cleanup branch February 17, 2020 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant