buddy: replace free-lists with binary tree

before this patch, the buddy allocator used a hybrid bitmap-freelist
approach where free would use the bitmap to determine size, but all
other operations we O(n) traversals of the free-list.

now, both alloc and free use the bitmap exclusively for allocation.
This commit is contained in:
Michael Shaw 2023-04-29 00:15:50 -04:00
commit 9222a373fc
5 changed files with 83 additions and 146 deletions

View file

@ -8,6 +8,7 @@
movq $\nr, %rdi
movq $0, %rsi
call exception
call yield
iretq
.endm
@ -17,6 +18,7 @@
popq %rsi
movq $\nr, %rdi
call exception
call yield
iretq
.endm