An Intro to Kernel Development - MMU - Part 9

10 mins

Let's see think about how we can implement a kmalloc..

In the previous blog we have debugged some issues related to linker script to get the location for array map. In this part, I have explained the flow from kmalloc to the actual physical page allocation. we have the helper that can allocate new pages and keep track of them using a bitmap array, what we need now is high level helper that can use this allocator internally - Allocate new pages based on the input size - Create page table entries for the new pages - return a pointer to the first page in this block Adding new page table entries is straight forward, as we already have the helpers that can find the index within the Table and mark it as block/table, I have also explained the table walk and value structure again to recall the basics . I have streamed the entire debugging session into two streams on YouTube.