Move C heap allocations into GC heap for RVALUE object data#4107
Closed
eightbitraptor wants to merge 5 commits into
Closed
Move C heap allocations into GC heap for RVALUE object data#4107eightbitraptor wants to merge 5 commits into
eightbitraptor wants to merge 5 commits into
Conversation
peterzhu2118
force-pushed
the
mvh-pz-vwa-mvp
branch
7 times, most recently
from
February 2, 2021 15:11
7c094cf to
5e4c7d2
Compare
Co-authored-by: peterzhu2118 <[email protected]>
Co-authored-by: peterzhu2118 <[email protected]>
Co-authored-by: peterzhu2118 <[email protected]>
Co-authored-by: peterzhu2118 <[email protected]>
Co-authored-by: peterzhu2118 <[email protected]>
peterzhu2118
force-pushed
the
mvh-pz-vwa-mvp
branch
from
February 5, 2021 15:17
5e4c7d2 to
59552d1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Redmine ticket
RVALUEis fixed width (40 bytes), some of which is used for accounting information and the remainder being used for storage of the object data (e.g. string contents). If the data required is larger than the available space inside theRVALUE, memory is allocated outside of the GC heap using malloc and a pointer to the malloc’d region is stored inside theRVALUEinstead.We intend to remove this extra memory allocation in favour of storing the extra data in a contiguous region of slots in the heap that are adjacent to the original
RVALUE.This branch is the minimum viable implementation required to test our hypothesis. We introduce an API to allocate regions that are multiple slots wide in the heap and we implement this API for objects of type
T_CLASSso that therb_classext_tstruct is stored in the heap alongside its owningRVALUE.cc @peterzhu2118