aboutsummaryrefslogtreecommitdiff
path: root/kernel/inc/mm.h
diff options
context:
space:
mode:
authorMarvin Borner2021-04-10 15:25:27 +0200
committerMarvin Borner2021-04-10 15:25:27 +0200
commitf96b8ad1ee83dec08ae636e179cc48019ca50b12 (patch)
tree80ff605e1305673291ce6230941db7ed4229856d /kernel/inc/mm.h
parent9655593d80e23d2ea3c091e3187e8e47b278bc3d (diff)
Some changes here and there
Diffstat (limited to 'kernel/inc/mm.h')
-rw-r--r--kernel/inc/mm.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/inc/mm.h b/kernel/inc/mm.h
index a9524ad..0f1b4ec 100644
--- a/kernel/inc/mm.h
+++ b/kernel/inc/mm.h
@@ -32,9 +32,9 @@ void physical_free(struct memory_range range);
* Virtual
*/
-#define PAGE_SIZE 0x1000
-#define PAGE_COUNT 1024
-#define PAGE_KERNEL_COUNT 256
+#define PAGE_SIZE 0x1000u
+#define PAGE_COUNT 1024u
+#define PAGE_KERNEL_COUNT 256u
#define PAGE_ALIGN(x) ((x) + PAGE_SIZE - ((x) % PAGE_SIZE))
#define PAGE_ALIGNED(x) ((x) % PAGE_SIZE == 0)
#define PAGE_ALIGN_UP(x) (((x) % PAGE_SIZE == 0) ? (x) : (x) + PAGE_SIZE - ((x) % PAGE_SIZE))
@@ -122,6 +122,7 @@ struct memory_range memory_range_from(u32 base, u32 size);
struct memory_range memory_range_around(u32 base, u32 size);
void *memory_alloc(struct page_dir *dir, u32 size, u32 flags) NONNULL;
+void *memory_alloc_with_boundary(struct page_dir *dir, u32 size, u32 flags) NONNULL;
void *memory_alloc_identity(struct page_dir *dir, u32 flags) NONNULL;
void memory_free(struct page_dir *dir, struct memory_range vrange) NONNULL;
void memory_map_identity(struct page_dir *dir, struct memory_range prange, u32 flags) NONNULL;