summaryrefslogtreecommitdiff
path: root/kc/core/vm_tree.h
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2022-02-24 01:58:07 +0000
committerAda Christine <adachristine18@gmail.com>2022-02-24 01:58:07 +0000
commit1923e47fd296399180eaf19b990d5e951d71ccd2 (patch)
tree2c61fa3d29321c3cf8e31a6ca1b1edcc053cb8f1 /kc/core/vm_tree.h
parent4fa48a2a7814c2f7d3992533313df283c3aa2652 (diff)
many changes
- boot time memory allocation has changed. the fractal page map has been replaced by a single self-mapped page giving 2MiB of ready virtual space to play with without needing a fully-initialized memory manager. this scheme may be repeated for other purposes - the page stack has now been totally overhauled to make use of sparse allocation and all of the ugly init_*() procedures are gone. long live the new interface. also reference counting is a thing now. sort of. - found a bug in vmt_init_node where insertion did not use the root node as the parent in the case of no predecessor node. whoops.
Diffstat (limited to 'kc/core/vm_tree.h')
-rw-r--r--kc/core/vm_tree.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/kc/core/vm_tree.h b/kc/core/vm_tree.h
index b2a64e2..a1d40c4 100644
--- a/kc/core/vm_tree.h
+++ b/kc/core/vm_tree.h
@@ -30,6 +30,9 @@
// The full text of the CC-BY-SA 3.0 license can be found here:
// https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License
+#include <stdint.h>
+#include <stddef.h>
+
enum vm_tree_direction
{
LEFT,
@@ -77,6 +80,13 @@ enum vm_tree_direction vmn_child_direction(
struct vm_tree_node *n,
struct vm_tree_node *p);
+void vmt_init_node(
+ struct vm_tree *tree,
+ struct vm_tree_node *node,
+ struct vm_object *object,
+ void *base,
+ void *head);
+
void vmt_delete(struct vm_tree*, struct vm_tree_node*);
struct vm_tree_node *vmt_search_key(struct vm_tree *, struct vm_tree_key *);