From 527a5ea7a896a9b00e0563abbbed7771a398971b Mon Sep 17 00:00:00 2001 From: aqua Date: Tue, 8 Nov 2022 10:46:07 +0200 Subject: Add python-sphinx docs --- doc.src/mem.rst | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 doc.src/mem.rst (limited to 'doc.src/mem.rst') diff --git a/doc.src/mem.rst b/doc.src/mem.rst new file mode 100644 index 0000000..2dd86a9 --- /dev/null +++ b/doc.src/mem.rst @@ -0,0 +1,32 @@ +================= +Memory management +================= + +A frame is a fixed-sized block of physical memory. A page is a fixed-size block of virtual memory. Both are of the same size (4kB). + +Physical memory allocator +========================= +The FrameAllocator takes a bitmap describing available physical memory and allocates free frames. There is one global +instance. + +Virtual memory allocator +======================== +The PageAllocator takes allocated Frames and mounts them in virtual memory. + +.. table:: Virtual address space layout + :widths: auto + + ============== ==================== =========== + address symbol description + ============== ==================== =========== + ``ffff ffff`` virtual memory end + ``d000 0000`` MMIO + ``c040 0000`` kernel allocator + page-aligned ``__data_begin`` + page-aligned ``__bss_begin`` + page-aligned ``__rodata_begin`` + ``c000 0000`` ``__text_begin`` kernel text + ``0000 0000`` virtual memory start + ============== ==================== =========== + +.. include:: mem/constinit.rst -- cgit v1.2.1