sos-os / alarm

ALARM: Another Library for Allocating and Releasing Memory
Apache License 2.0
8 stars 6 forks source link

leaky page frame allocator #28

Open hawkw opened 6 years ago

hawkw commented 6 years ago

The kernel will need a simple page frame allocator to start allocating the initial frames that we'll use permanently, before we set up a page frame allocator with bookkeeping. It's okay for this allocator to leak frames, as we'll never want to de-allocate these initial frame allocations for e.g. re-mapping the kernel.

It seems to me that the easiest and possibly the most compose-able way to write this allocator is just to implement FrameAllocator for Iterator<Item=Frame>. The various architecture-specific memory map providers in the kernel can all return iterators over memory areas, and we can map them into a frame representation and then use that iterator as an allocator.

it should:

hawkw commented 6 years ago

This is probably not terribly hard but does require some background knowledge.