-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge front/back padding after allocate current hole (#54)
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.
- Loading branch information
Showing
1 changed file
with
32 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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