summaryrefslogtreecommitdiff
path: root/src/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/memory.h')
-rw-r--r--src/memory.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/memory.h b/src/memory.h
new file mode 100644
index 0000000..3c38af7
--- /dev/null
+++ b/src/memory.h
@@ -0,0 +1,35 @@
+#ifndef __MEMORY_H
+#define __MEMORY_H
+
+#include <stdint.h>
+#include "redacted.h"
+#include "multiboot.h"
+
+enum cell_type {
+ FREE_CELL,
+ CONS_CELL,
+ INT_CELL,
+ CHAR_CELL,
+ FLOAT_CELL,
+ ARRAY_CELL,
+ ARRAY_MEMBER,
+ APIOFORM
+};
+
+struct cell {
+ uint8_t type;
+ union car {
+ struct cell *free;
+ struct cell *cons;
+ struct {int type : 8; int size : 24;} ARRAY_CELL;
+ uint32_t int_;
+ uint32_t char_;
+ float float_;
+ REDACTED_t apioform;
+ };
+ struct cell *cdr;
+};
+
+void init_memory(multiboot_info_t *mb);
+
+#endif