Removed old testing junk

rust
E. Almqvist 3 years ago
parent 3b1e25b047
commit a3516b9ded
  1. 24
      kernel/kernel.c

@ -7,7 +7,6 @@ void init() {
println("Kernel loaded", SUCCESS_COLOR); println("Kernel loaded", SUCCESS_COLOR);
// Allocate VGA memory range // Allocate VGA memory range
println("Allocating VGA memory...", DEFAULT_COLOR);
pm_malloc_range(VGA_ADDRESS, VGA_ADDRESS_MAX, true); // force alloc the VGA range pm_malloc_range(VGA_ADDRESS, VGA_ADDRESS_MAX, true); // force alloc the VGA range
// ENABLE PAGING // ENABLE PAGING
@ -15,31 +14,10 @@ void init() {
// enable_paging(); // enable_paging();
println(""); println("");
char* title = "eOS Version 0.4 2022"; char* title = "eOS - lim[h->0] (1+h)^(1/h) OS";
println(title, DEFAULT_COLOR); println(title, DEFAULT_COLOR);
char* subtitle = "A x86 operating system, licenced under GPL-2.0"; char* subtitle = "A x86 operating system, licenced under GPL-2.0";
println(subtitle, DEFAULT_COLOR); println(subtitle, DEFAULT_COLOR);
// Memory allocation testing
printalign("-- PMM malloc Tests --", DEFAULT_COLOR, MIDDLE);
println("THESE MALLOC SHOULD WORK (no text => success):", 0xa0);
for(int i=0; i < 4; i++) {
pm_malloc(1);
}
println("(2) THIS ALLOC SHOULD FAIL:", 0xc0);
block_alloc(2); // this should fail
println("(2) Freeing 2nd block, alloc after should succeed", DEFAULT_COLOR);
block_free(2); // after this, allocation of 2nd block should work
block_alloc(2);
printalign("-- End of PMM malloc Tests --", DEFAULT_COLOR, MIDDLE);
char* strbuf = "Concat test: ";
char* str2 = "Works!";
strbuf = strcat(strbuf, str2);
println(strbuf, DEFAULT_COLOR);
} }

Loading…
Cancel
Save