Show allocated/mapped stats

This commit is contained in:
Mathieu Maret 2024-02-11 15:34:33 +01:00
parent 026618a730
commit 7b953e625e
2 changed files with 1 additions and 2 deletions

View File

@ -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();
}
}

View File

@ -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;
}