-
Notifications
You must be signed in to change notification settings - Fork 24
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
New allocation algorithm #1166
Conversation
59be401
to
9a72c6e
Compare
…rent_block_ptr and collection_block_ptr; added initialization for data members
…n; moved some inline functions from arena.cpp to arena.h; make struct memory_block_header in a union; fix comments
…(); fix for move_ptr()
f89f156
to
a75b285
Compare
There was a problem hiding this 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.
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. |
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().