Files
ficus/src/arch/x86/memman.hpp
Stepan Usatiuk 63af59f5ac Tweak clang-format to not align across empty lines
That should fix insane function declarations
2024-04-14 16:55:50 +02:00

31 lines
699 B
C++

//
// Created by Stepan Usatiuk on 12.08.2023.
//
#ifndef FICUS_MEMMAN_H
#define FICUS_MEMMAN_H
#include "limine.h"
enum PageStatus {
MEMMAN_STATE_FREE = 1,
MEMMAN_STATE_USED = 2,
MEMMAN_STATE_RESERVED = 0,
MEMMAN_STATE_RECLAIMABLE = 3,
};
struct FourPages {
enum PageStatus first : 2;
enum PageStatus second : 2;
enum PageStatus third : 2;
enum PageStatus fourth : 2;
} __attribute__((packed));
static_assert(sizeof(FourPages) == 1);
void parse_limine_memmap(struct limine_memmap_entry *entries, unsigned int num, uint64_t what_is_considered_free);
void *get4k();
void free4k(void *page);
uint64_t get_free();
#endif //FICUS_MEMMAN_H