make dmm.c portable
[lunaix-os.git] / lunaix-os / includes / lunaix / mm / kalloc.h
1 #ifndef __LUNAIX_KALLOC_H
2 #define __LUNAIX_KALLOC_H
3
4 #include <stddef.h>
5
6 int
7 kalloc_init();
8
9 /**
10  * @brief Allocate a space in kernel heap.This is NOT the same as kmalloc in Linux! 
11  * LunaixOS does NOT guarantee the continuity in physical pages.
12  * 
13  * @param size 
14  * @return void* 
15  */
16 void*
17 kmalloc(size_t size);
18
19 /**
20  * @brief calloc for kernel heap. A wrapper for kmalloc
21  * 
22  * @param size 
23  * @return void* 
24  */
25 void*
26 kcalloc(size_t size);
27
28 /**
29  * @brief free for kernel heap
30  * 
31  * @param size 
32  * @return void* 
33  */
34 void
35 kfree(void* ptr);
36
37 #endif /* __LUNAIX_KALLOC_H */