Luna/kernel/include/memory/PMM.h

26 lines
504 B
C
Raw Normal View History

#pragma once
2022-11-12 10:30:28 +00:00
#include "utils/Result.h"
#include <stdint.h>
namespace PMM
{
void init();
2022-11-12 10:30:28 +00:00
Result<void*> request_page();
Result<void*> request_pages(uint64_t count);
void free_page(void* address);
void free_pages(void* address, uint64_t count);
void lock_page(void* address);
void lock_pages(void* address, uint64_t count);
uint64_t get_free();
uint64_t get_used();
uint64_t get_reserved();
uint64_t get_bitmap_size();
void map_bitmap_to_virtual();
};