Writing a memory manager: Difference between revisions
[unchecked revision] | [unchecked revision] |
Content deleted Content added
mNo edit summary |
m Partial revert of 0xjarno's changes. I don't have a problem with numbering but it messed up the layout. |
||
Line 25:
How do we find a free block? (this is for a first fit method with a header, but for a basic buddy system all you need is some imagination)
Once you have found one, set it's used bit to used. If the space found is significantly larger than the space needed, then it is generally a good idea to split it up (cut it in half, then half again, or add another header right after the used space and update the pointers.. use your imagination!) ;] Then return the address!
|