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
merge front/back padding after allocate current hole #54
merge front/back padding after allocate current hole #54
Conversation
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.
Thanks a lot for the PR and sorry for the late review. Looks good to me!
Unfortunately I missed the time window to approve the CI run, which is required by GitHub because this is your first contribution here. Could you push some dummy update to this PR (e.g. an empty commit or a no-op rebase) so that we retry this? Please ping me when you do.
4c8b987
to
adf2772
Compare
@phil-opp |
Thanks a lot! Looks like there is a minor rustfmt issue, otherwise this seems good to go |
When we allocate a memory chunk, there may be some memory paddings in front/back of the allocated chunk. Before this change, these paddings are dealed by calling function deallocate. However the implementation is inefficient since deallocate function will search from the beginning of the linked-list and find the right place to insert these paddings. With this change, the paddings are linked to linked-list right after they are generated. We don't have to deal with merge continuous since paddings are guaranteed to be separated between them and to previous and next holes.
Head branch was pushed to by a user without write access
adf2772
to
a8ab176
Compare
@phil-opp |
Thanks!
See https://github.blog/2021-04-22-github-actions-update-helping-maintainers-combat-bad-actors/. Basically, there were some people that abused the automatic CI runs to mine cryptocurrency, so GitHub made manual approvals for first-time contributors manditory. |
I'll publish this together with #55 as soon as its merged. |
See. Glad to being accepted. |
When we allocate a memory chunk, there may be some memory paddings
in front/back of the allocated chunk. Before this change, these paddings
are dealed by calling function deallocate.
However the implementation is inefficient since deallocate function will
search from the beginning of the linked-list and find the right place to
insert these paddings.
With this change, the paddings are linked to linked-list right after
they are generated. We don't have to deal with merge continuous since
paddings are guaranteed to be separated between them and to previous and
next holes.
Fixes #53