1 #include <geekos/vmm_stubs.h>
2 #include <geekos/serial.h>
5 void * Allocate_VMM_Pages(int num_pages) {
6 void * start_page = Alloc_Page();
7 SerialPrint("Allocating Page: %x (%d of %d)\n",start_page, 1, num_pages);
10 while (i < num_pages) {
11 void * tmp_page = Alloc_Page();
12 SerialPrint("Allocating Page: %x (%d of %d)\n",tmp_page, i+1, num_pages);
14 if (tmp_page != start_page + (PAGE_SIZE * i)) {
15 //we have to start over...;
17 Free_Page(start_page + (PAGE_SIZE * i));
20 start_page = Alloc_Page();
21 SerialPrint("Allocating Page: %x (%d of %d)\n",start_page, 1, num_pages);
31 void Free_VMM_Page(void * page) {
36 void * VMM_Malloc(uint_t size) {
37 return Malloc((ulong_t) size);
41 void VMM_Free(void * addr) {