21 lines
320 B
C
21 lines
320 B
C
#ifndef MM_H
|
|
#define MM_H
|
|
|
|
#include <list.h>
|
|
|
|
#define MM_PAGE_SIZE 4096
|
|
|
|
struct page {
|
|
void *address;
|
|
struct dlist_node list;
|
|
char free;
|
|
};
|
|
|
|
void mm_init();
|
|
void mm_add_free_region(void *start, void *end);
|
|
|
|
struct page* mm_get_free_pages(unsigned int power);
|
|
int mm_put_free_pages(struct page *p);
|
|
|
|
#endif /* MM_H */
|