I'm currently extending my virtual memory manager, and i'm wondering whether i shouldn't restart it from scratch. In such case, advice from other experiences may be very valuable ...
So i'd like to ask you how you did address the problem of 'memory objects' allocation (how to reserve large chunk of memory for .text and .data sections, for user stacks, mapped files, shared libraries, etc.), or if you haven't implemented it yet, if you have hints on how your Reference Operating System (the one you're learning from if any) does it ...
So far, i was mainly creating lists inside of the page table (using free entries to store 'next free zone', 'zone size', etc. in the small 32 bits areas), but it has problems when you want to allocate objects that are larger than a page table

So i'm wondering about a technique that would rather use two binary trees (one sorting areas by their size so that you can quickly allocate new areas, and the other one sorting them by address range, so that you can quickly check if there should be a merge or not).
Also, i'd like to know how you planned to implement the 'properties' of memory regions, like whether it should zero new pages or not, on which file it should get it, if the page should become copy-on-write or just shared in case of a process fork and that kind of stuff.
On my side, i have so-called "memory objects" that handle messages coming from the kernel, and every region is mapped to a given memory object.
Looking forward for your hints.