Heap for first MB
Posted: Sat Dec 15, 2012 12:41 pm
Hi, I'm trying (just for fun, not a serious project) to write a boot manager.
With some copy/paste I get to protected mode from fat12 in half an hour...
Anyway I now need some sort of heap. Having malloc/free - new/delete is always good.
I usually use dlmalloc. However dlmalloc is HUGE. I would need something that:
Any suggestion for such a memory allocator? Any dlmalloc configuration? Or just an idea of how to implement it...
Thanks in advance.
With some copy/paste I get to protected mode from fat12 in half an hour...
Anyway I now need some sort of heap. Having malloc/free - new/delete is always good.
I usually use dlmalloc. However dlmalloc is HUGE. I would need something that:
- Is lightning fast (today boot must be fast, and no bottleneck is accepted)
- Is small
- Supports for aligned mallocs (for page tables/directories)
- Doesn't need paging
- Can handle reserved zones (between 0x500 and 0x7FFFF there is 0x7C00 and I want to keep it safe)
Any suggestion for such a memory allocator? Any dlmalloc configuration? Or just an idea of how to implement it...
Thanks in advance.