rustubs

Module mm

Source
Expand description

memory management unit

Modules§

  • pma 🔒
    (deprecated) a simple stack based 4K physical frame allocator.
  • a very simple virtual memory manager

Structs§

Constants§

Statics§

Functions§

  • allocate 4k aligned memory. TODO create a buffer (like in KStackAllocator) for performance.
  • drop the low memory mapping from the current pagetable by removing the first entry from pml4 table (which mapps to 0~512G). The PDP table is unchanged, wasting 4K of memory but there is nothing we can do now since the heap allocator doesn’t manage this address.
  • flush the whole tlb
  • half measure: simply initialize the linkedlist allocator
  • invalidate a single page mapping in tlb