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

New allocation algorithm #1166

Merged
merged 18 commits into from
Dec 6, 2024
Merged

New allocation algorithm #1166

merged 18 commits into from
Dec 6, 2024

Conversation

stevenmeker
Copy link
Collaborator

Replaced algorithm in class arena with one that uses mmap()'d address spaces and demand paging for each semispace and initializes the current semispace of each arena at start time to avoid and the second semispace of each arena at swap time to avoid relying on Undefined Behavior or having an extra test in kore_arena_alloc().

@rv-jenkins rv-jenkins changed the base branch from master to develop November 22, 2024 01:12
Copy link
Collaborator

@theo25 theo25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

Just to make sure I understand correctly, could you confirm if the following is accurate: In this new allocation algorithm, we have only one memory block header at the start of the hyperblock, as opposed to the previous algorithm that had one header per smaller block. This is the reason for the change in the calculation for arena size. Also, we still compute the equivalent of the number of small blocks in the new algorithm to inform GC triggering decisions.

@stevenmeker
Copy link
Collaborator Author

That is correct. I tried to simulate the old GC triggering algorithm, however note that allocations > 1 MB are now accommodated in the GC'd arena.

@dwightguth dwightguth enabled auto-merge (squash) December 6, 2024 18:11
@dwightguth dwightguth merged commit dd25f06 into develop Dec 6, 2024
10 checks passed
@dwightguth dwightguth deleted the new_alloc branch December 6, 2024 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants