wip: change memory to have access to page_tables and allocate these dynamically

This commit is contained in:
2024-10-25 15:11:11 +02:00
parent f5147e78f9
commit a9bfb49bb8
7 changed files with 52 additions and 35 deletions

View File

@ -36,8 +36,9 @@ void kernel_main(void)
"I see no way to confuse an array of 256 seg:off pairs with a "
"complex 8*unknown quantity -byte descriptor table. -- Troy "
"Martin 03:50, 22 March 2009 (UTC)\n");
/* char *str = vmalloc(10); */
/* strcpy(str, "hello"); */
char *str = vmalloc(10);
if (str)
strcpy(str, "hello");
/* int i = 0; */
/* while (vmalloc(10)) */
/* ; */
@ -45,9 +46,9 @@ void kernel_main(void)
/* kprintf("%d\n", i); */
/* void *tab[1024]; */
/* for (int i = 0; i < 1023; i++) { */
/* tab[i] = alloc_pages(1); */
/* PRINT_INT(i); */
/* PRINT_PTR(tab[i]); */
/* tab[i] = alloc_pages(1, NULL); */
/* PRINT_INT(i); */
/* PRINT_PTR(tab[i]); */
/* if (!tab[i]) */
/* break; */
/* memset(tab[i], i, 4096); */
@ -56,5 +57,5 @@ void kernel_main(void)
/* for (int i = 0; i < 10; i++) */
/* PRINT_UINT(((uint8_t *)tab[i])[0]); */
/* PRINT_PTR(tab[i]); */
/* shell_init(); */
shell_init();
}