Writing a memory manager: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
No edit summary
m sentence sounded bad
Line 1:
=== First fit MM ===
It's suprising how many people have problems writing a memory allocator. It's not that hard to implement a basic first fit MM. By memory manager, I don't mean paging (you just keep a list of free/used pages), but rather a simple library you can use in userspace and in your kernel (or globally if you have a flat memory model).
 
What I'm going to talk about assumes you know where the chunk of free memory is you can play with. For a flat memory model, this can be from the end of your kernel code (say the 1/2MB mark) to the end of the system memory (GRUB can give you this info). For a paging kernel, this can be the beginning of the page to the end of the page.