feature: both physical and virtual allocators should be done

This commit is contained in:
2024-09-26 16:18:06 +02:00
parent 9ade568a64
commit a66f9174f4
19 changed files with 571 additions and 62 deletions

View File

@ -1,6 +1,6 @@
#pragma once
#include <stdint.h>
#include <stddef.h>
#define PRESENT (1 << 0)
#define RW (1 << 1)
@ -10,5 +10,7 @@
#define PAGE_SIZE 4096
void init_memory(void);
void *kalloc_frame(uint32_t nb_frames);
int kfree_frame(void *frame, uint32_t nb_frames);
void *alloc_frames(size_t size);
int free_frames(void *frame_ptr, size_t size);
void *alloc_pages(size_t size);
int free_pages(void *page_ptr, size_t size);