From 7b953e625e2f5863a3932a797ef67cb1fd835408 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Sun, 11 Feb 2024 15:34:33 +0100 Subject: [PATCH] Show allocated/mapped stats --- core/main.c | 2 +- core/uaddrspace.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/main.c b/core/main.c index 2db8bec..d04addd 100644 --- a/core/main.c +++ b/core/main.c @@ -36,7 +36,7 @@ void idleThread(void *arg) { (void)arg; while (1) { - VGAPrintf(GREEN, BLACK, 0, VGA_HEIGHT - 1, "%d", (jiffies / HZ)); + VGAPrintf(GREEN, BLACK, 0, VGA_HEIGHT - 1, "%d allocated %d, mapped %d", (jiffies / HZ), getNbAllocatedPage(), getNbMappedPage()); threadYield(); } } diff --git a/core/uaddrspace.c b/core/uaddrspace.c index d41d955..3d1e6d8 100644 --- a/core/uaddrspace.c +++ b/core/uaddrspace.c @@ -269,7 +269,6 @@ uaddr_t sysBrk(struct uAddrSpace *as, uaddr_t newHeapTop) incSize = ALIGN(newHeapTop - (as->heapStart + as->heapSize), PAGE_SIZE); if (incSize < 0){ - //TODO how to free allocated page by uAddrSpaceHeapCheckNAlloc return as->heapStart + as->heapSize; }