Wrote memory map in C, removed C++ code

This commit is contained in:
2021-04-11 04:04:09 -05:00
parent 557f3194ed
commit 7fc6c40c54
6 changed files with 151 additions and 539 deletions

20
include/memorymap.h Normal file
View File

@@ -0,0 +1,20 @@
#pragma once
#include "types/physaddr.h"
#include <stddef.h>
struct memory_region_t
{
physaddr_t location;
size_t size;
unsigned int type;
};
struct memory_map_t
{
struct memory_region_t *array;
size_t size;
size_t capacity;
};
void insert_region(struct memory_map_t *map, physaddr_t location, size_t size, unsigned int type);