Writing a memory manager: Difference between revisions
[unchecked revision] | [unchecked revision] |
Content deleted Content added
No edit summary |
|||
Line 33:
*** return an error (such as a pointer to 0)
# Does this header say this memory is free
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!
|