From a1874c03f71f2910601047f61126108b8f0a5362 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 21 Sep 2018 23:40:07 +0100 Subject: [PATCH] bankfixed: improve debug --- Kernel/bankfixed.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Kernel/bankfixed.c b/Kernel/bankfixed.c index 962bc13c..b7a3e3e9 100644 --- a/Kernel/bankfixed.c +++ b/Kernel/bankfixed.c @@ -98,13 +98,13 @@ int swapout(ptptr p) if (!page) panic(PANIC_ALREADYSWAP); -#ifdef DEBUG - kprintf("Swapping out %x (%d)\n", p, p->p_page); -#endif /* Are we out of swap ? */ map = swapmap_alloc(); if (map == 0) return ENOMEM; +#ifdef DEBUG + kprintf("Swapping out %x (%d) to map %d\n", p, p->p_page, map); +#endif blk = map * SWAP_SIZE; /* Write the app (and possibly the uarea etc..) to disk */ swapwrite(SWAPDEV, blk, SWAPTOP - SWAPBASE, SWAPBASE, p->p_page); @@ -125,7 +125,7 @@ void swapin(ptptr p, uint16_t map) uint16_t blk = map * SWAP_SIZE; #ifdef DEBUG - kprintf("Swapin %x, %d\n", p, p->p_page); + kprintf("Swapin %x, %d from map %d\n", p, p->p_page, map); #endif if (!p->p_page) { kprintf("%x: nopage!\n", p); -- 2.34.1