blu_os
Loading...
Searching...
No Matches
physicalmemorymanager.h
1//
2// Created by dylan on 14/07/2026.
3//
4
5#ifndef BLU_OS_PHYSICALMEMORYMANAGER_H
6#define BLU_OS_PHYSICALMEMORYMANAGER_H
7
8#include <stdint.h>
9#include <stddef.h>
10
11#define KERNEL_VMA 0xC0000000
12
13#define PAGE_SIZE 4096
14#define FREE 0x00
15#define USED 0x01
16#define ERROR 0x00000000
17
18typedef uint32_t physical_addr_t;
19
20extern uint32_t endKernel;
21
22void initPhysicalMemoryManager(size_t memSizeInMb);
23
24physical_addr_t kallocFrame();
25
26void kfreeFrame(physical_addr_t frameAddress);
27
28#endif //BLU_OS_PHYSICALMEMORYMANAGER_H
Common definitions for C programs.
Fixed-width integer types.