1

dealloc memory when exiting vesa mode

This commit is contained in:
2022-07-22 20:44:35 +02:00
parent cde3967961
commit 061fa5db57
3 changed files with 9 additions and 4 deletions

View File

@ -56,8 +56,9 @@ struct VbeInfoBlock {
* Beschreibung: Schalter in den Text-Modus 80x25 Zeichen. *
*****************************************************************************/
void VESA::initTextMode() {
BC_params->AX = 0x4f02; // SVFA BIOS, init mode
BC_params->BX = 0x4003; // 80x25
allocator.free((void*)hfb); // Memory is allocated after every start and never deleted, so add that
BC_params->AX = 0x4f02; // SVFA BIOS, init mode
BC_params->BX = 0x4003; // 80x25
bios.Int(0x10);
}

View File

@ -103,5 +103,5 @@ void VBEdemo::run() {
drawFonts();
// selbst terminieren
scheduler.exit();
// scheduler.exit();
}

View File

@ -10,8 +10,8 @@
#ifndef __VBEdemo_include__
#define __VBEdemo_include__
#include "kernel/threads/Thread.h"
#include "kernel/Globals.h"
#include "kernel/threads/Thread.h"
class VBEdemo : public Thread {
@ -28,6 +28,10 @@ public:
kout << "Initialized VBEdemo" << endl;
}
~VBEdemo() override {
vesa.initTextMode();
}
// Thread-Startmethode
void run() override;