2022-08-21 19:18:53 +00:00
|
|
|
#pragma once
|
|
|
|
#include <stddef.h>
|
2023-02-19 22:38:32 +00:00
|
|
|
#include <CoreLib/Memory.h>
|
|
|
|
|
2022-09-01 18:16:16 +00:00
|
|
|
#include "../prekernel/bootstructure.h"
|
|
|
|
#include "../terminal/kterm.h"
|
2022-08-21 19:18:53 +00:00
|
|
|
#include "../bitmap.h"
|
|
|
|
|
2022-09-03 15:27:29 +00:00
|
|
|
#define BLOCK_SIZE 4092
|
2022-08-21 19:18:53 +00:00
|
|
|
|
|
|
|
|
2022-09-02 23:00:17 +00:00
|
|
|
void SetupPhysicalMemoryManager(uint32_t mapAddress, uint32_t memorySize);
|
2022-08-21 19:18:53 +00:00
|
|
|
|
|
|
|
void* allocate_block();
|
2022-09-02 23:00:17 +00:00
|
|
|
void free_block(void* ptr);
|
|
|
|
|
|
|
|
void allocate_region(uint32_t address, uint32_t size);
|
|
|
|
void deallocate_region(uint32_t address, uint32_t size);
|
|
|
|
|
|
|
|
int GetUsedBlocks();
|