Compacting the heap without the page table#9704
Closed
xavierleroy wants to merge 1 commit intoocaml:trunkfrom
Closed
Compacting the heap without the page table#9704xavierleroy wants to merge 1 commit intoocaml:trunkfrom
xavierleroy wants to merge 1 commit intoocaml:trunkfrom
Conversation
This removes the last use of the page table in the non-debug runtime system in no-naked-pointers mode. The data structure is just an array of major heap chunks, sorted by increasing address, in which we do binary search.
Contributor
Author
|
The synthetic benchmark. It builds a heap where half the blocks are dead, then compacts. |
Contributor
Author
|
Superceded by #9728. Closing. |
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.
This PR removes the last use of the page table in the non-debug runtime system in no-naked-pointers mode.
To provide an alternate implementation of the
Is_in_heappredicate, we build an array of major heap chunks, sorted by increasing address, and do binary search in this array.Performance is very close to the current implementation that uses page table lookups instead. On the synthetic benchmark below, we get:
There might be other implementations of the compactor that make no
Is_in_heaptests, so this may not be the best solution. I'm submitting this as a draft pull request to show that we can get rid of the page table entirely and now.