Small adjustment in directory structure of memory and bootloader files in kernel

This commit is contained in:
2021-11-02 21:15:00 +01:00
parent c9b789ed7b
commit bdcf9e66f8
11 changed files with 17 additions and 137 deletions

View File

@ -0,0 +1,33 @@
#pragma once
/**
* We'll need something to this effect to allocate memory in the kernel
* this will hopefully someday implement a full slab allocator
**/
enum SlabState {
empty,
partial,
full
};
class CacheSlab {
const int SlabSize = 4000;
void* start = 0x0;
};
class Allocator {
public:
Allocator();
~Allocator();
void* kmalloc( int size );
void kfree (void* address);
private:
CacheSlab** _cache;
};