summaryrefslogtreecommitdiff
path: root/include/mem.h
diff options
context:
space:
mode:
authorNathan Lee <me@nwlee.tech>2026-06-19 19:05:01 -0500
committerNathan Lee <me@nwlee.tech>2026-06-19 19:05:01 -0500
commit5c15e93fa87800b1f8fae7ef688a9d41221526f1 (patch)
tree2b8ed7b696edc9889b588dd79db14c564ea9a77e /include/mem.h
parentb106df2447d23d6b3fcffa7cc87edde218d054f3 (diff)
create dtb allocator
the parent commit (b106df2447d23d6b3fcffa7cc87edde218d054f3) discussed the possibility of creating dtb device discovery. for that, we have replaced wdt device discovery with dtb device discovery. in the future, we will use the pci kernel module to use device discovery via a PCI controller
Diffstat (limited to 'include/mem.h')
-rw-r--r--include/mem.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/mem.h b/include/mem.h
index 12976df..6135786 100644
--- a/include/mem.h
+++ b/include/mem.h
@@ -1,8 +1,6 @@
#pragma once
#include <types.h>
-#define EHEAP_SIZE (512 * 1024)
-
typedef enum {
PAGE_FREE,
PAGE_ALLOCATED
@@ -14,6 +12,11 @@ struct page {
struct page* next;
};
+struct mem_info {
+ void* start;
+ size_t size;
+};
+
void* kmalloc(size_t size);
void* memcpy(void* to, const void* from,size_t size);