Make MMTk recognize pointers to object ends as internal pointers #280
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.
See mmtk/mmtk-core#1410. For types like
(true, ()), the length of the object is 9 bytes (including a 8-byte header). So the field()is 0-size at the end of the object, and an internal pointer to it actually points outside the allocated memory for this object. In such case, MMTk does not consider it as an internal pointer.One example is https://github.com/mmtk/julia/blob/10c2bb0a05530e0c0fdca9b04d8321440267216c/src/staticdata.c#L1766 where the runtime iterates through all the fields and
slotcan point to a()field at the end of an object. MMTk core does not consider it as an internal pointer, as it points to the memory outside the object. If we intend to use address based hashing for htables, the above code needs to find the base object forslotand find the stored hash for the base object. It is necessary for MMTk to correctly consider it as an internal pointer, and be able to find the base object.