use tree allocator

This commit is contained in:
churl
2022-05-10 00:21:00 +02:00
parent b7fbb822c1
commit 824b8e9ddf
3 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -16,4 +16,5 @@ CGA_Stream kout; // Ausgabe-Strom fuer Kernel
Keyboard kb; // Tastatur Keyboard kb; // Tastatur
unsigned int total_mem; // RAM total unsigned int total_mem; // RAM total
// BumpAllocator allocator; // BumpAllocator allocator;
LinkedListAllocator allocator; // LinkedListAllocator allocator;
TreeAllocator allocator;
+3 -1
View File
@@ -15,6 +15,7 @@
#include "devices/PCSPK.h" #include "devices/PCSPK.h"
#include "kernel/allocator/BumpAllocator.h" #include "kernel/allocator/BumpAllocator.h"
#include "kernel/allocator/LinkedListAllocator.h" #include "kernel/allocator/LinkedListAllocator.h"
#include "kernel/allocator/TreeAllocator.h"
#include "kernel/CPU.h" #include "kernel/CPU.h"
extern CPU cpu; // CPU-spezifische Funktionen extern CPU cpu; // CPU-spezifische Funktionen
@@ -23,6 +24,7 @@ extern CGA_Stream kout; // Ausgabe-Strom fuer Kernel
extern Keyboard kb; // Tastatur extern Keyboard kb; // Tastatur
extern unsigned int total_mem; // RAM total extern unsigned int total_mem; // RAM total
// extern BumpAllocator allocator; // extern BumpAllocator allocator;
extern LinkedListAllocator allocator; // extern LinkedListAllocator allocator;
extern TreeAllocator allocator;
#endif #endif
+4 -2
View File
@@ -24,10 +24,12 @@ void scroll_mode() {
switch ((char)key) { switch ((char)key) {
case 'k': case 'k':
kout.show(kout.COLUMNS - 1, 0, (char)(48 + kout.scroll_page_backward())); kout.scroll_page_backward();
kout.show(kout.COLUMNS - 1, 0, (char)(48 + kout.current_page));
break; break;
case 'j': case 'j':
kout.show(kout.COLUMNS - 1, 0, (char)(48 + kout.scroll_page_forward())); kout.scroll_page_forward();
kout.show(kout.COLUMNS - 1, 0, (char)(48 + kout.current_page));
break; break;
} }
} }