Hello guys,
I'm writing my first kernel and I got to the point of implementing the memory manager.
Right now I have a working PMM as well as an interface around the MMU (map/unmap a given virtual address to a given physical page).
I'm now trying to write the Virtual Address Allocator. From what I gathered, the better solution is to have two AVL trees, each containing memory areas and their information and respectively sorted by address and size.
But my question is the following: how do I allocate the nodes that go inside these trees?
I do not have a way to use dynamic memory yet (no kernel heap), and used a static bitmap for my PMM, but i cannot statically allocate the whole tree this time around.
Thank you in advance for your advice !