Commit d9a3ac9
authored
Implement a dynamic virtual memory manager (#7)
* Implement vaddr_t_to_ptr
* vaddr_t should have uint16_t indices
* Add a simple alloc_vpage
* Fix some mistypes
* Revamp to a smarter alloc system + add alloc_vpages
* Format + add free_all_vpages_in_range
* Bugfix + quell some warnings
* Minor readability improvement
* Add free for vpages
* Move the check for pml4 index to free_vpages
* Switch to novel vmm for malloc
* Deprecate try_assign_pt
* Remove now unused 'allocated' flag
* Remove most of init_memmgt
* Don't delete the pdpt even if it is empty
* Format
* Add a message to signify that execution has completed
* Expose the alloc functions just in case
* Make static some file-only functions
* init_memmgt -> __init_memmgt__ to match convention1 parent f9944f5 commit d9a3ac9
3 files changed
Lines changed: 333 additions & 100 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| |||
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
84 | 83 | | |
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
90 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
91 | 96 | | |
92 | | - | |
| 97 | + | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
96 | | - | |
97 | | - | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
0 commit comments