[Algorithms] Memory Allocators
Brought to you by:
vexxed72
From: Chris B. <Chr...@ma...> - 2003-02-05 05:58:08
|
Can anyone here recommend a small easy to understand memory manager. I'm stuck writing a utility to allocate AGP ram and would like a reference. How I'm doing(or am trying to) it is I allocate a block of memory to the manager. The manager then is asked for memory. It subdivides it's pool in POW2 increments until it's found the smallest division thats larger than the requested size. Marks the allocation as used and returns the pointer. The pointer is stored as an ID ready for the 'deallocation'(unmarking). I'm considering things like keeping lists of the unused fragments in an ordered vector for easier searching as well. Does anyone have any information on a implementation on how I can get away with doing this? Many thanks, Chris NOTICE This e-mail and any attachments are confidential and may contain copyright material of Macquarie Bank or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Bank does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Bank. |