blob: 2dd86a95c8e6584931227dce9d41fad2892f4ad2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
|