Add a basic kernel heap object.
Currently allocation always fails because we don't have a way to allocate a physical page.
This commit is contained in:
parent
45b5817a36
commit
0b7e667368
6 changed files with 140 additions and 6 deletions
14
zion/memory/kernel_heap.h
Normal file
14
zion/memory/kernel_heap.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
class KernelHeap {
|
||||
public:
|
||||
KernelHeap(uint64_t lower_bound, uint64_t upper_bound);
|
||||
|
||||
void* Allocate(uint64_t size);
|
||||
|
||||
private:
|
||||
uint64_t next_addr_;
|
||||
uint64_t upper_bound_;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue