summaryrefslogtreecommitdiff
path: root/kernel/mem.h
blob: e8e6a4f4d802703a1d9c460e627561b7201ce572 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#pragma once
#include <stddef.h>

#define PAGE_SIZE 4096

void mem_init();

// allocates `pages` consecutive pages
void *page_alloc(size_t pages);

// frees `pages` consecutive pages starting from *first
void page_free(void *first, size_t pages);