[runtime] Fix issue #376: Unify memory runtime #440
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes issue #376. Currently there is a lot of redundant code between the libOSes for the memory runtime. This changes moves the implementation of the MemoryRuntime trait for heap-allocated memory to the default implementation and leaves specially allocated memory in the relevant libOS. At this time, we only have a separate implementation for Catnip.
Summary of changes:
Note: Catmem is a little awkward because it doesn't not contain a runtime, so directly implements the trait, which the demikernel layer then directly uses. Since the MemoryRuntime trait is only accessible from Catmem and not the Demikernel layer, I had to wrap some of the functions, rather than directly using the default. I will fix this architecture eventually.