Skip to content

Commit

Permalink
Cleanup and freeing vga_font memory
Browse files Browse the repository at this point in the history
  • Loading branch information
Paweł Łukasik committed Oct 5, 2024
1 parent c671116 commit 9d8f900
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/impl/kernel/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ ASMCALL void kernel_main(boot_info* boot_info, void* l4_page_table) {
Framebuffer::Init(boot_fb);

TerminalPrinter terminal;
pci bus;

terminal.print_clear();
terminal.print_set_color(PRINT_COLOR_YELLOW, PRINT_COLOR_BLACK);
Expand Down Expand Up @@ -130,7 +129,7 @@ ASMCALL void kernel_main(boot_info* boot_info, void* l4_page_table) {
}
else if (memcmp(cmd, quit_cmd, sizeof(quit_cmd)))
{
klog("bye bye ;)");
klog("bye bye ;)\n");
break;
}
else {
Expand All @@ -151,5 +150,6 @@ ASMCALL void kernel_main(boot_info* boot_info, void* l4_page_table) {
}
}
}
Framebuffer::get_instance()->Free();
halt();
}
4 changes: 4 additions & 0 deletions src/intf/framebuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class Framebuffer
{}

static void Init(const boot_framebuffer *fb);
void Free() {
vmm.kfree(vga_font);
this->vga_font = nullptr;
}
static Framebuffer* get_instance();

void Draw(const pt::uint8_t* what,
Expand Down

0 comments on commit 9d8f900

Please sign in to comment.