[Zion] Track used vs free physical memory.

This commit is contained in:
Drew Galbraith 2023-11-15 14:53:05 -08:00
parent 8e95a11907
commit 0b47e3b7fc
3 changed files with 35 additions and 7 deletions

View file

@ -7,6 +7,7 @@
#include "interrupt/apic.h"
#include "interrupt/apic_timer.h"
#include "memory/kernel_heap.h"
#include "memory/physical_memory.h"
#include "scheduler/scheduler.h"
#define IDT_INTERRUPT_GATE 0x8E
@ -142,6 +143,7 @@ extern "C" void interrupt_apic_timer(InterruptFrame*) {
if (cnt % 20 == 0) {
if (cnt == 20) {
KernelHeap::DumpDebugData();
phys_mem::DumpPhysicalMemoryUsage();
}
dbgln("timer: {}s", cnt * 50 / 1000);
}