1

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

View File

@ -16,4 +16,5 @@ CGA_Stream kout; // Ausgabe-Strom fuer Kernel
Keyboard kb; // Tastatur
unsigned int total_mem; // RAM total
// BumpAllocator allocator;
LinkedListAllocator allocator;
// LinkedListAllocator allocator;
TreeAllocator allocator;

View File

@ -15,6 +15,7 @@
#include "devices/PCSPK.h"
#include "kernel/allocator/BumpAllocator.h"
#include "kernel/allocator/LinkedListAllocator.h"
#include "kernel/allocator/TreeAllocator.h"
#include "kernel/CPU.h"
extern CPU cpu; // CPU-spezifische Funktionen
@ -23,6 +24,7 @@ extern CGA_Stream kout; // Ausgabe-Strom fuer Kernel
extern Keyboard kb; // Tastatur
extern unsigned int total_mem; // RAM total
// extern BumpAllocator allocator;
extern LinkedListAllocator allocator;
// extern LinkedListAllocator allocator;
extern TreeAllocator allocator;
#endif

View File

@ -24,10 +24,12 @@ void scroll_mode() {
switch ((char)key) {
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;
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;
}
}