diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-11-08 10:46:07 +0200 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-11-08 14:56:42 +0200 |
commit | 527a5ea7a896a9b00e0563abbbed7771a398971b (patch) | |
tree | 81dcbe1b95c88bea447dfcc32d6fed46835713bb /doc.src/mem.rst | |
parent | Capture ps2 mouse packets (diff) | |
download | kernel-527a5ea7a896a9b00e0563abbbed7771a398971b.tar.xz |
Add python-sphinx docs
Diffstat (limited to 'doc.src/mem.rst')
-rw-r--r-- | doc.src/mem.rst | 32 |
1 files changed, 32 insertions, 0 deletions
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 |