add System::free_pages()

This commit is contained in:
josh committed 2016-07-14 18:42:26 -04:00
1 parent ef6abd8ed7
commit 5a8894498b
2 files changed
+6

No files matched your search

+5
View File
@@ -54,3 +54,8 @@ void * System::alloc_pages(int num)
-1,
0);
}
void System::free_pages(void * addr, int num)
{
(void)munmap(addr, num << System::page_size_log);
}
+1
View File
@@ -6,6 +6,7 @@ class System
public:
static bool init();
static void * alloc_pages(int num);
static void free_pages(void * addr, int num);
static unsigned long page_size;
static unsigned int page_size_log;