1
0

mm.c/h -> frames.c/h: Naming indicating dealing with physical not virtual memory

This commit is contained in:
2013-01-01 23:42:45 -05:00
parent e279d83d7d
commit 806d00f471
9 changed files with 79 additions and 66 deletions

View File

@ -18,23 +18,23 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MM_H
#define MM_H
#ifndef FRAMES_H
#define FRAMES_H
#include <list.h>
#define MM_PAGE_SIZE 4096
struct page {
struct frame {
void *address;
struct dlist_node list;
char free;
};
void mm_init();
void mm_add_free_region(void *start, void *end);
void frames_init();
void declare_memory_region(void *start, void *end);
struct page* mm_get_free_pages(unsigned int power);
int mm_put_free_pages(struct page *p);
struct frame* get_free_frames(unsigned int power);
int put_free_frames(struct frame *p);
#endif /* MM_H */
#endif /* FRAMES_H */