blob: 866915d62c0f76ccd261becf92a024ae237b5c1a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef APOS_MM_NODES_H
#define APOS_MM_NODES_H
/**
* @file mem_nodes.h
* Memory node subsystem. Used by the memory region subsystem.
*/
#include <apos/vmem.h>
#include <apos/nodes.h>
/**
* 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 */
|