Skip to content

Replace buddy allocator with free list allocator#183

Merged
SamTebbs33 merged 1 commit intodevelopfrom
feature/free-list-allocator
Jul 14, 2020
Merged

Replace buddy allocator with free list allocator#183
SamTebbs33 merged 1 commit intodevelopfrom
feature/free-list-allocator

Conversation

@SamTebbs33
Copy link
Collaborator

This patch adds a new allocator which uses a free list over a buddy system. Once this PR is done I will fully replace heap.zig with heap2.zig. Let me know if the design is unclear or if any of the code could be cleaned up since it is quite complex atm.

@SamTebbs33 SamTebbs33 requested a review from DrDeano July 11, 2020 20:14
Copy link
Member

@DrDeano DrDeano left a comment

Choose a reason for hiding this comment

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

Looks very nice, maybe could rename the old one to old_heap.
Missing a few doc comments XD. Need to keep that consistency :)
Also you mix one line if's and multi line:
if (blah) statement and

if (blah)
    statement

The ones that are used as assignments are fine, and ones that have break or continue I think are fine as one line, but the others could be multi line with {}

@SamTebbs33 SamTebbs33 force-pushed the feature/free-list-allocator branch from 3958382 to d73c92a Compare July 12, 2020 19:13
Copy link
Member

@DrDeano DrDeano left a comment

Choose a reason for hiding this comment

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

One the tests pass, can wait to finally run the scheduler XD

@SamTebbs33 SamTebbs33 force-pushed the feature/free-list-allocator branch 2 times, most recently from b264d35 to 6c2559d Compare July 14, 2020 18:23
@SamTebbs33 SamTebbs33 force-pushed the feature/free-list-allocator branch from 6c2559d to 6d4b3e9 Compare July 14, 2020 18:38
@SamTebbs33 SamTebbs33 merged commit 2082654 into develop Jul 14, 2020
@SamTebbs33 SamTebbs33 deleted the feature/free-list-allocator branch July 14, 2020 18:49
@SamTebbs33 SamTebbs33 mentioned this pull request Jul 20, 2020
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.

2 participants