james molloy's OS kheap has so many bugs !!!
Posted: Thu Jul 02, 2020 3:30 am
I am reading james molloy's OS dev tutorial, getting to the kheap portion... so far
I have to say it has so many bugs I suspect that he wasn't really rigourous with that
part of tutorial at least...
below is a very incomplete list
* there are cases where unifying left can occur multiple times. but he assume it would only occur
once
* there are cases where unifying right can occur multiple time. but he assume that it would happen
once
* there are case the last header on the heap is a memory block,but he ignores that
* there are cases where page alignment would require the page alignment to occur at the second page
boundry instead of the first one
* all the rewritten holes need to be re-inserted into the ordered array, but his instruction is to leave them
in the same position in the array because it is already in the array... the reality is that after unifying the
hole size has changed, it must be repositioned in the post
* there are also cases where the hole needs to be split into 2 holes and one block...
any comment on why it is so insanely buggy!!
I have to say it has so many bugs I suspect that he wasn't really rigourous with that
part of tutorial at least...
below is a very incomplete list
* there are cases where unifying left can occur multiple times. but he assume it would only occur
once
* there are cases where unifying right can occur multiple time. but he assume that it would happen
once
* there are case the last header on the heap is a memory block,but he ignores that
* there are cases where page alignment would require the page alignment to occur at the second page
boundry instead of the first one
* all the rewritten holes need to be re-inserted into the ordered array, but his instruction is to leave them
in the same position in the array because it is already in the array... the reality is that after unifying the
hole size has changed, it must be repositioned in the post
* there are also cases where the hole needs to be split into 2 holes and one block...
any comment on why it is so insanely buggy!!