aboutsummaryrefslogtreecommitdiff
path: root/include/apos/mem_nodes.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-05-29 16:23:41 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-05-29 16:23:41 +0300
commitd7cb08134102b7a2410c48d2a1802193f9031e00 (patch)
tree711498836d6679ca2fc3b4ba9369b7fe53d7a3fa /include/apos/mem_nodes.h
parente148f38dc937c34b222ba8df8612b3fa2b6bc349 (diff)
downloadkmi-d7cb08134102b7a2410c48d2a1802193f9031e00.tar.gz
kmi-d7cb08134102b7a2410c48d2a1802193f9031e00.zip
continue documentation efforts
Diffstat (limited to 'include/apos/mem_nodes.h')
-rw-r--r--include/apos/mem_nodes.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/include/apos/mem_nodes.h b/include/apos/mem_nodes.h
index f0d1361..866915d 100644
--- a/include/apos/mem_nodes.h
+++ b/include/apos/mem_nodes.h
@@ -9,10 +9,31 @@
#include <apos/vmem.h>
#include <apos/nodes.h>
-void init_mem_blocks();
-void destroy_mem_blocks();
+/**
+ * Initialize memory node subsystem.
+ *
+ * @pre Physical memory subsystem has been initialized.
+ */
+void init_mem_nodes();
+
+/**
+ * Destroy memory node subsystem.
+ * Free all associated allocations.
+ */
+void destroy_mem_nodes();
+/**
+ * Fetch a new memory node.
+ *
+ * @return Pointer to \ref mem_region node on success, \c NULL otherwise.
+ */
struct mem_region *get_mem_node();
+
+/**
+ * Free a memory node.
+ *
+ * @param m Pointer to \ref mem_region node to free.
+ */
void free_mem_node(struct mem_region *m);
#endif /* APOS_MM_NODES_H */