I had a manager done before, but I lost the sources, I am working on a new version and the benchmark somewhat together since it will be dependant on each other. I think I have most of my specifics worked, only a few things my allocator will rely on.
A.) The process' memory space is linear (starting and ending values are given to manager), and is also passed the page size.
B.) The kernel has a function to mark a page in the process' memory space as useable.
Theseare the only things relied on by my manager, it will allocate space for itself when it's initialize function is called, as well as create a list (a single entry actually) of all available memory. When you allocate a large chunk it will ask for more memory, and split the list into used/unused. If you allocate a single byte of memory, it will allocate a page, store info in the list of free memory about this page, and what the granularity of it is (byte, word, dword, qword, 16-bytes, whatever 'small' size it may be). This way, if our app asks for another byte, it will set the appropriate bit, and return a pointer to the next free byte. Testing will determine what seems necessary, like do I really need a byte allocator, or would a size of 2 or 4 be sufficient, especially for things like alignment, testing will tell, but that's a bit far off right now. Anyways, I'm still working out a few more specifics, but I will be sure to share code once complete, so stay tuned
.